﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Collections;
using TwinCAT.Ads;
using System.Runtime.InteropServices;
using System.Threading;
using Entity;
using System.IO;

namespace Project_V1
{
    #region 定义结构体
    [StructLayout(LayoutKind.Sequential, Pack = 4)]//8字节对齐
    public struct TestStruct
    { 
        [MarshalAs(UnmanagedType.I1)]
        public bool bVar1;
        [MarshalAs(UnmanagedType.I1)]
        public bool bVar2;
        [MarshalAs(UnmanagedType.I1)]
        public bool bVar3;
        [MarshalAs(UnmanagedType.I1)]
        public bool bVar4;
        [MarshalAs(UnmanagedType.I1)]
        public bool bVar5;
        [MarshalAs(UnmanagedType.I1)]
        public bool bVar6;
        [MarshalAs(UnmanagedType.I1)]
        public bool bVar7;
        [MarshalAs(UnmanagedType.I1)]
        public bool bVar8;
        [MarshalAs(UnmanagedType.I1)]
        public bool bVar9;
        [MarshalAs(UnmanagedType.I1)]
        public bool bVar10;
        [MarshalAs(UnmanagedType.I1)]
        public bool bVar11;
        [MarshalAs(UnmanagedType.I1)]
        public bool bVar12;
        [MarshalAs(UnmanagedType.I1)]
        public bool bVar13;
        [MarshalAs(UnmanagedType.I1)]
        public bool bVar14;
        [MarshalAs(UnmanagedType.I1)]
        public bool bVar15;
        [MarshalAs(UnmanagedType.I1)]
        public bool bVar16;
        [MarshalAs(UnmanagedType.I1)]
        public bool bVar17;
        [MarshalAs(UnmanagedType.I1)]
        public bool bVar18;
        [MarshalAs(UnmanagedType.I1)]
        public bool bVar19;
        [MarshalAs(UnmanagedType.I1)]
        public bool bVar20;
        [MarshalAs(UnmanagedType.I1)]
        public bool bVar21;
        [MarshalAs(UnmanagedType.I1)]
        public bool bVar22;
        [MarshalAs(UnmanagedType.I1)]
        public bool bVar23;
        [MarshalAs(UnmanagedType.I1)]
        public bool bVar24;
        [MarshalAs(UnmanagedType.I1)]
        public bool bVar25;
        [MarshalAs(UnmanagedType.I1)]
        public bool bVar26;
        [MarshalAs(UnmanagedType.I1)]
        public bool bVar27;
        [MarshalAs(UnmanagedType.I1)]
        public bool bVar28;
        [MarshalAs(UnmanagedType.I1)]
        public bool bVar29;
        [MarshalAs(UnmanagedType.I1)]
        public bool bVar30;
        [MarshalAs(UnmanagedType.I1)]
        public bool bVar31;
        [MarshalAs(UnmanagedType.I1)]
        public bool bVar32;
        [MarshalAs(UnmanagedType.I1)]
        public bool bVar33;
        [MarshalAs(UnmanagedType.I1)]
        public bool bVar34;
        [MarshalAs(UnmanagedType.I1)]
        public bool bVar35;
        [MarshalAs(UnmanagedType.I1)]
        public bool bVar36;
        [MarshalAs(UnmanagedType.I1)]
        public bool bVar37;
        [MarshalAs(UnmanagedType.I1)]
        public bool bVar38;
        [MarshalAs(UnmanagedType.I1)]
        public bool bVar39;
        [MarshalAs(UnmanagedType.I1)]
        public bool bVar40;
        [MarshalAs(UnmanagedType.I1)]
        public bool bVar41;
        [MarshalAs(UnmanagedType.I1)]
        public bool bVar42;
        [MarshalAs(UnmanagedType.I1)]
        public bool bVar43;
        [MarshalAs(UnmanagedType.I1)]
        public bool bVar44;
        [MarshalAs(UnmanagedType.I1)]
        public bool bVar45;
        [MarshalAs(UnmanagedType.I1)]
        public bool bVar46;
        [MarshalAs(UnmanagedType.I1)]
        public bool bVar47;
        [MarshalAs(UnmanagedType.I1)]
        public bool bVar48;
        [MarshalAs(UnmanagedType.I1)]
        public bool bVar49;
        [MarshalAs(UnmanagedType.I1)]
        public bool bVar50;
        [MarshalAs(UnmanagedType.I1)]
        public bool bVar51;
        [MarshalAs(UnmanagedType.I1)]
        public bool bVar52;
        [MarshalAs(UnmanagedType.I1)]
        public bool bVar53;
        [MarshalAs(UnmanagedType.I1)]
        public bool bVar54;
        [MarshalAs(UnmanagedType.I1)]
        public bool bVar55;
        [MarshalAs(UnmanagedType.I1)]
        public bool bVar56;
        [MarshalAs(UnmanagedType.I1)]
        public bool bVar57;
        [MarshalAs(UnmanagedType.I1)]
        public bool bVar58;
        [MarshalAs(UnmanagedType.I1)]
        public bool bVar59;
        [MarshalAs(UnmanagedType.I1)]
        public bool bVar60;
        [MarshalAs(UnmanagedType.I1)]
        public bool bVar61;
        [MarshalAs(UnmanagedType.I1)]
        public bool bVar62;
        [MarshalAs(UnmanagedType.I1)]
        public bool bVar63;
        [MarshalAs(UnmanagedType.I1)]
        public bool bVar64;
        [MarshalAs(UnmanagedType.I1)]
        public bool bVar65;

        [MarshalAs(UnmanagedType.I1)]
        public bool bVar66;
        [MarshalAs(UnmanagedType.I1)]
        public bool bVar67;
        [MarshalAs(UnmanagedType.I1)]
        public bool bVar68;
        [MarshalAs(UnmanagedType.I1)]
        public bool bVar69;
        [MarshalAs(UnmanagedType.I1)]
        public bool bVar70;
        [MarshalAs(UnmanagedType.I1)]
        public bool bVar71;
        [MarshalAs(UnmanagedType.I1)]
        public bool bVar72;
        [MarshalAs(UnmanagedType.I1)]
        public bool bVar73;
        [MarshalAs(UnmanagedType.I1)]
        public bool bVar74;
        [MarshalAs(UnmanagedType.I1)]
        public bool bVar75;
        [MarshalAs(UnmanagedType.I1)]
        public bool bVar76;
        [MarshalAs(UnmanagedType.I1)]
        public bool bVar77;
        [MarshalAs(UnmanagedType.I1)]
        public bool bVar78;
        [MarshalAs(UnmanagedType.I1)]
        public bool bVar79;
        [MarshalAs(UnmanagedType.I1)]
        public bool bVar80;
        [MarshalAs(UnmanagedType.I1)]
        public bool bVar81;
        [MarshalAs(UnmanagedType.I1)]
        public bool bVar82;
        [MarshalAs(UnmanagedType.I1)]
        public bool bVar83;
        [MarshalAs(UnmanagedType.I1)]
        public bool bVar84;
        [MarshalAs(UnmanagedType.I1)]
        public bool bVar85;
        [MarshalAs(UnmanagedType.I1)]
        public bool bVar86;
        [MarshalAs(UnmanagedType.I1)]
        public bool bVar87;
        [MarshalAs(UnmanagedType.I1)]
        public bool bVar88;
        [MarshalAs(UnmanagedType.I1)]
        public bool bVar89;
        [MarshalAs(UnmanagedType.I1)]
        public bool bVar90;
        [MarshalAs(UnmanagedType.I1)]
        public bool bVar91;
        [MarshalAs(UnmanagedType.I1)]
        public bool bVar92;
        [MarshalAs(UnmanagedType.I1)]
        public bool bVar93;
        [MarshalAs(UnmanagedType.I1)]
        public bool bVar94;
        [MarshalAs(UnmanagedType.I1)]
        public bool bVar95; 
        [MarshalAs(UnmanagedType.I1)]
        public bool bVar96;
        [MarshalAs(UnmanagedType.I1)]
        public bool bVar97;
        [MarshalAs(UnmanagedType.I1)]
        public bool bVar98;
        [MarshalAs(UnmanagedType.I1)]
        public bool bVar99;
        [MarshalAs(UnmanagedType.I1)]
        public bool bVar100;
        [MarshalAs(UnmanagedType.I1)]
        public bool bVar101;
        [MarshalAs(UnmanagedType.I1)]
        public bool bVar102;
        [MarshalAs(UnmanagedType.I1)]
        public bool bVar103;
        [MarshalAs(UnmanagedType.I1)]
        public bool bVar104;
        [MarshalAs(UnmanagedType.I1)]
        public bool bVar105;
        [MarshalAs(UnmanagedType.I1)]
        public bool bVar106;
        [MarshalAs(UnmanagedType.I1)]
        public bool bVar107;
        [MarshalAs(UnmanagedType.I1)]
        public bool bVar108;

        [MarshalAs(UnmanagedType.I1)]
        public bool bVar109;
        [MarshalAs(UnmanagedType.I1)]
        public bool bVar110;


        [MarshalAs(UnmanagedType.U2)]
        public ushort uVar1;
        [MarshalAs(UnmanagedType.U2)]
        public ushort uVar2;
        [MarshalAs(UnmanagedType.U2)]
        public ushort uVar3;
        [MarshalAs(UnmanagedType.U2)]
        public ushort uVar4;
        [MarshalAs(UnmanagedType.U2)]
        public ushort uVar5;
        [MarshalAs(UnmanagedType.U2)]
        public ushort uVar6;
        [MarshalAs(UnmanagedType.U2)]
        public ushort uVar7;
        [MarshalAs(UnmanagedType.U2)]
        public ushort uVar8;
        [MarshalAs(UnmanagedType.U2)]
        public ushort uVar9;
        [MarshalAs(UnmanagedType.U2)]
        public ushort uVar10;
        [MarshalAs(UnmanagedType.U2)]
        public ushort uVar11;
        [MarshalAs(UnmanagedType.U2)]
        public ushort uVar12;
        [MarshalAs(UnmanagedType.U2)]
        public ushort uVar13;
        [MarshalAs(UnmanagedType.U2)]
        public ushort uVar14;
        [MarshalAs(UnmanagedType.U2)]
        public ushort uVar15;
        [MarshalAs(UnmanagedType.U2)]   
        public ushort uVar16;
        [MarshalAs(UnmanagedType.U2)]   
        public ushort uVar17; 
        [MarshalAs(UnmanagedType.U2)]
        public ushort uVar18;
        [MarshalAs(UnmanagedType.U2)]
        public ushort uVar19;



        [MarshalAs(UnmanagedType.U2)]
        public ushort uVar20;
        [MarshalAs(UnmanagedType.U2)]
        public ushort uVar21;
        [MarshalAs(UnmanagedType.U2)]
        public ushort uVar22;
        [MarshalAs(UnmanagedType.U2)]
        public ushort uVar23;
        [MarshalAs(UnmanagedType.U2)]
        public ushort uVar24;
        [MarshalAs(UnmanagedType.U2)]
        public ushort uVar25;
        [MarshalAs(UnmanagedType.U2)]
        public ushort uVar26;
        [MarshalAs(UnmanagedType.U2)]
        public ushort uVar27;
        [MarshalAs(UnmanagedType.U2)]
        public ushort uVar28;
        [MarshalAs(UnmanagedType.U2)]
        public ushort uVar29;
        [MarshalAs(UnmanagedType.U2)]
        public ushort uVar30;
        [MarshalAs(UnmanagedType.U2)]
        public ushort uVar31;
        [MarshalAs(UnmanagedType.U2)]
        public ushort uVar32;



        [MarshalAs(UnmanagedType.U4)]
        public UInt32 uintVar1;
        [MarshalAs(UnmanagedType.U4)]
        public UInt32 uintVar2;
        [MarshalAs(UnmanagedType.U4)]
        public UInt32 uintVar3;
        [MarshalAs(UnmanagedType.U4)]
        public UInt32 uintVar4;


        [MarshalAs(UnmanagedType.U4)]
        public UInt32 uintVar5;
        [MarshalAs(UnmanagedType.U4)]
        public UInt32 uintVar6;
        [MarshalAs(UnmanagedType.U4)]
        public UInt32 uintVar7;
        [MarshalAs(UnmanagedType.U4)]
        public UInt32 uintVar8;
        [MarshalAs(UnmanagedType.U4)]
        public UInt32 uintVar9;
        [MarshalAs(UnmanagedType.U4)]
        public UInt32 uintVar10;
        [MarshalAs(UnmanagedType.U4)]
        public UInt32 uintVar11;
        [MarshalAs(UnmanagedType.U4)]
        public UInt32 uintVar12;
        [MarshalAs(UnmanagedType.U4)]
        public UInt32 uintVar13;






        [MarshalAs(UnmanagedType.R4)]
        public float fVar1;
        [MarshalAs(UnmanagedType.R4)]
        public float fVar2;
        [MarshalAs(UnmanagedType.R4)]
        public float fVar3;
        [MarshalAs(UnmanagedType.R4)]
        public float fVar4;
        [MarshalAs(UnmanagedType.R4)]
        public float fVar5;
        [MarshalAs(UnmanagedType.R4)]
        public float fVar6;
        [MarshalAs(UnmanagedType.R4)]
        public float fVar7;
        [MarshalAs(UnmanagedType.R4)]
        public float fVar8;
        [MarshalAs(UnmanagedType.R4)]
        public float fVar9;
        [MarshalAs(UnmanagedType.R4)]
        public float fVar10;
        [MarshalAs(UnmanagedType.R4)]
        public float fVar11;
        [MarshalAs(UnmanagedType.R4)]
        public float fVar12;
        [MarshalAs(UnmanagedType.R4)]
        public float fVar13;
        [MarshalAs(UnmanagedType.R4)]
        public float fVar14;
        [MarshalAs(UnmanagedType.R4)]
        public float fVar15;
        [MarshalAs(UnmanagedType.R4)]
        public float fVar16;
        [MarshalAs(UnmanagedType.R4)]
        public float fVar17;
        [MarshalAs(UnmanagedType.R4)]
        public float fVar18;
        [MarshalAs(UnmanagedType.R4)]
        public float fVar19;
        [MarshalAs(UnmanagedType.R4)]
        public float fVar20;
        [MarshalAs(UnmanagedType.R4)]
        public float fVar21;
        [MarshalAs(UnmanagedType.R4)]
        public float fVar22;
        [MarshalAs(UnmanagedType.R4)]
        public float fVar23;
        [MarshalAs(UnmanagedType.R4)]
        public float fVar24;
        [MarshalAs(UnmanagedType.R4)]
        public float fVar25;
        [MarshalAs(UnmanagedType.R4)]
        public float fVar26;
        [MarshalAs(UnmanagedType.R4)]
        public float fVar27;
        [MarshalAs(UnmanagedType.R4)]
        public float fVar28;
        [MarshalAs(UnmanagedType.R4)]
        public float fVar29;
        [MarshalAs(UnmanagedType.R4)]
        public float fVar30;
        [MarshalAs(UnmanagedType.R4)]
        public float fVar31;
        [MarshalAs(UnmanagedType.R4)]
        public float fVar32;
        [MarshalAs(UnmanagedType.R4)]
        public float fVar33;
        [MarshalAs(UnmanagedType.R4)]
        public float fVar34;
        [MarshalAs(UnmanagedType.R4)]
        public float fVar35;
        [MarshalAs(UnmanagedType.R4)]
        public float fVar36;
        [MarshalAs(UnmanagedType.R4)]
        public float fVar37;
        [MarshalAs(UnmanagedType.R4)]
        public float fVar38;
        [MarshalAs(UnmanagedType.R4)]
        public float fVar39;
        [MarshalAs(UnmanagedType.R4)]
        public float fVar40;
        [MarshalAs(UnmanagedType.R4)]
        public float fVar41;
        [MarshalAs(UnmanagedType.R4)]
        public float fVar42;
        [MarshalAs(UnmanagedType.R4)]
        public float fVar43;
        [MarshalAs(UnmanagedType.R4)]
        public float fVar44;
        [MarshalAs(UnmanagedType.R4)]
        public float fVar45;
        [MarshalAs(UnmanagedType.R4)]
        public float fVar46;
        [MarshalAs(UnmanagedType.R4)]
        public float fVar47;
        [MarshalAs(UnmanagedType.R4)]
        public float fVar48;
        [MarshalAs(UnmanagedType.R4)]
        public float fVar49;
        [MarshalAs(UnmanagedType.R4)]
        public float fVar50;
        [MarshalAs(UnmanagedType.R4)]
        public float fVar51;
        [MarshalAs(UnmanagedType.R4)]
        public float fVar52;
        [MarshalAs(UnmanagedType.R4)]
        public float fVar53;
        [MarshalAs(UnmanagedType.R4)]
        public float fVar54;
        [MarshalAs(UnmanagedType.R4)]
        public float fVar55;
        [MarshalAs(UnmanagedType.R4)]
        public float fVar56;





        [MarshalAs(UnmanagedType.R4)]
        public float fVar57;
        [MarshalAs(UnmanagedType.R4)]
        public float fVar58;
        [MarshalAs(UnmanagedType.R4)]
        public float fVar59;
        [MarshalAs(UnmanagedType.R4)]
        public float fVar60;
        [MarshalAs(UnmanagedType.R4)]
        public float fVar61;
        [MarshalAs(UnmanagedType.R4)]
        public float fVar62;
        [MarshalAs(UnmanagedType.R4)]
        public float fVar63;
        [MarshalAs(UnmanagedType.R4)]
        public float fVar64;
        [MarshalAs(UnmanagedType.R4)]
        public float fVar65;
        [MarshalAs(UnmanagedType.R4)]
        public float fVar66;
        [MarshalAs(UnmanagedType.R4)]
        public float fVar67;
        [MarshalAs(UnmanagedType.R4)]
        public float fVar68;
        [MarshalAs(UnmanagedType.R4)]
        public float fVar69; 


    }

    [StructLayout(LayoutKind.Sequential, Pack = 4)]
    public struct CacheStruct
    {
        [MarshalAs(UnmanagedType.R4)]
        public float ffvar1;
        [MarshalAs(UnmanagedType.R4)]
        public float ffvar2;
        [MarshalAs(UnmanagedType.R4)]
        public float ffvar3;
        [MarshalAs(UnmanagedType.R4)]
        public float ffvar4;
        [MarshalAs(UnmanagedType.R4)]
        public float ffvar5;
        [MarshalAs(UnmanagedType.U2)]
        public ushort iCount;
    }

    [StructLayout(LayoutKind.Sequential, Pack = 4)]
    public struct Cache1
    {
        //[MarshalAs(UnmanagedType.ByValArray, SizeConst = 500)]
        [MarshalAs(UnmanagedType.ByValArray, SizeConst = 1000)]
        public CacheStruct[] Axis;
    }

    //[StructLayout(LayoutKind.Sequential, Pack = 4)]//8字节对齐
    public struct HMIVar
    {
        public bool SysIsReady;
        public bool SysAlarmActive;
        public bool SysNotEmgStop;
        public bool ErrDoorOpen;
        public bool SysManualMode;
        public bool SysAutoMode;
        public bool SysExcMode;
        public bool SysDebugMode;
        public ushort SysStep;
        public ushort ManualStep;
        public ushort AutoStep;
        public ushort ExcStep;
        public ushort DebugStep;
        public float DataPressure;
        public float DataTorque;
        public float ActVelo2;
        public float ActVelo1;
        public float ActPos2;
        public float MaxPressure;
        public float MaxTorque;
        public ushort Timer;
        public bool status1;
        public bool status2;
        public bool status3;
        public bool status4;
        public bool status5;
        public bool status6;
        public bool status7;
        public bool status8;
        public bool btDebug;
        public bool btMotorDebug;
        public bool btFeedTest;
        public bool Enabled1;
        public bool Error1;
        public float JogVelocity1;
        public bool btManualJogF1;
        public bool btManualJogB1;
        public bool btManualPower1;
        public bool btReset1;
        public bool Enabled2;
        public bool Error2;
        public float MotorDebug_Axis2SetVelo;
        public float MotorDebug_Axis2SetPos;
        public float MotorDebug_Axis2SwitchForce;
        public float MotorDebug_Axis2SetForce;
        public float MotorDebug_Axis2ForcePosLimit;
        public bool MotorDebug_Axis2JOGMinus;
        public bool MotorDebug_Axis2JOGPlus;
        public bool MotorDebug_Axis2HOME;
        public bool MotorDebug_Axis2PoStart;
        public bool MotorDebug_Axis2ForceStart;
        public bool MotorDebug_Axis2STOP;
        public bool MotorDebug_Axis2Reset;
        public bool Feeding;
        public bool FeedingStop;
        public bool FeedingOK;
        public bool FeedingNOK;
        public ushort FeedingTime;
        public ushort MaxFeedingTime;
        public bool btFeed;
        public bool btFeedingTestStart_Stop;
        public bool btDay_Night;
        public UInt32 FeedMachModel;
        public bool btFeedMachPushRivetValve;
        public bool btFeedMachBlowRivetValve;
        public bool FeedMachRivetOK;
        public bool FeedMachPushRivetBasic;
        public bool FeedMachPushRivetWork;
        public bool FeedMachRivetOut;
        public UInt32 FeedMachLastCycleCounter;
        public UInt32 FeedMachNowCycleCounter;
        public UInt32 FeedMachRivetOutCounter;
        public bool btFeedMachLastCycleCounterClean;
        public bool btFeedMachNowCycleCounterClean;
        public bool btFeedMachRivetOutCounterClean;
        public bool FeedMachNowCycleing;
        public bool FeedMachBlowRivetOverTimeAlarm;
        public bool FeedMachBlowRivetOverTimeReset;
        public bool FeedMachRivetOutOverTimeAlarm;
        public bool FeedMachRivetOutOverTimeReset;
        public ushort FeedMachRivetOutOverTime;
        public bool btClampValve;
        public bool btCachePlacePushRivetValve;
        public bool btCachePlaceBlowRivetValve;
        public bool btEnableVacuoValve;
        public bool btDisableVacuoValve;
        public bool btGunHeadBlowRivetValve;
        public bool btPrePressureExtendValve;
        public bool btPrePressureRetractValve;
        public bool CachePlaceRivetIn;
        public bool CachePlaceRivetOut;
        public bool GunHeadRivetIn;
        public bool CachePlaceRivetAt;
        public bool ClampWork;
        public bool ClampBasic;
        public bool CachePlacePushRivetWork;
        public bool CachePlacePushRivetBasic;
        public bool PrePressureWork1;
        public bool PrePressureBasic1;
        public bool PrePressureWork2;
        public bool PrePressureBasic2;
        public bool VacuoValueRch1;
        public bool LimitSwitchUp;
        public bool LimitSwitchOrigin;
        public bool LimitSwitchDown;
        public UInt32 GunLastCycleCounter;
        public UInt32 GunNowCycleCounter;
        public UInt32 CachePlaceRivetInCounter;
        public UInt32 RivetInCounter;
        public UInt32 RivetOutCounter;
        public UInt32 InhaleRivetOKCounter;
        public UInt32 InhaleRivetNOKCounter;
        public bool btCounterClear;
        public bool btGunLastCycleCounterClean;
        public bool btGunNowCycleCounterClean;
        public bool btCachePlaceRivetInCounterClean;
        public bool btCachePlaceRivetOutCounterClean;
        public bool btGunHeadRivetInCounterClean;
        public bool btInhaleRivetOKCounterClean;
        public bool btInhaleRivetNOKCounterClean;
        public bool btInhaleRivetActualCounterClean;
        public bool GunNowCycleing;
        public bool CachePlaceRivetInOverTimeAlarm;
        public bool CachePlaceRivetInOverTimeReset;
        public bool CachePlaceRivetAtOverTimeAlarm;
        public bool CachePlaceRivetAtOverTimeReset;
        public bool CachePlaceBlowRivetOverTimeAlarm;
        public bool CachePlaceBlowRivetOverTimeReset;
        public bool CachePlaceRivetOutOverTimeAlarm;
        public bool CachePlaceRivetOutOverTimeReset;
        public bool GunHeadRivetInOverTimeAlarm;
        public bool GunHeadRivetInOverTimeReset;
        public bool FeedingNOKLater_CycleContinue;
        public bool InhaleRivetLater_DisableVacuoAlarm;
        public bool InhaleRivetLater_DisableVacuoReset;
        public ushort EnableVacuoValveLater_SampleTime1;
        public ushort EnableVacuoValveLater_SampleTime2;
        public ushort VacuoRchLater_SampleTime;
        public ushort CachePlaceRivetInOverTime;
        public ushort CachePlaceRivetAtOverTime;
        public ushort CachePlaceRivetAtHeartbeatTime;
        public ushort CachePlaceRivetOutOverTime;
        public ushort GunHeadRivetInOverTime;
        public ushort GunHeadRivetIn_EnableVacuoValveDelayTime;
        public ushort FeedTest_InhaleRivetMaxTime;
        public ushort FeedTest_InhaleRivetIntervalTime;
        public UInt32 FeedTest_InhaleRivetMaxCounter;
        public float PrePressureSetValue;
        public float FeedPos1;
        public float FeedTest_InhaleRivetTargetPos;
        public float FeedTest_Velo1;
        public float FeedTest_Acc1;
        public float FeedTest_Dec1;
        public float FeedTest_Jerk1;
        public float FeedTest_Velo2;
        public float FeedTest_Acc2;
        public float FeedTest_Dec2;
        public float FeedTest_Jerk2;
        public float EnableVacuoValveLater_VacuoValue1;
        public float EnableVacuoValveLater_VacuoValue2;
        public float SingleCycleVacuoValue;
        public ushort EnableVacuoValve_VacuoRchTime;
        public ushort TestFeedingTime;
        public UInt32 InhaleRivetActualCounter;
        public float VacuoValue1;
        public float PrePressureRefValue;
        public bool PrePressing;
        public bool PrePressingStop;
        public bool PrePressingOK;
        public bool PrePressingNOK;
        public bool PrePressingNOK_OverTime;
        public bool PrePressingNOK_NOTVacuo;
        public bool PrePressingNOK_OverPosition;
        public ushort PrePressingTime;
        public float PrePressOKPositionRecord;
        public float PrePressHighPosition;
        public float PrePressHighSpeed;
        public float PrePressLowPosition;
        public float PrePressLowSpeed;
        public float PrePressTouchForce;
        public float PrePressForce;
        public ushort MaxPrePressingTime;
        public bool Riveting;
        public bool RivetingStop;
        public bool RivetingOK;
        public bool RivetingNOK;
        public ushort RivetingTime;
        public float RivetOKPositionRecord;
        public UInt32 TechnicsNumber;
        public ushort MultistageId;
        public ushort MaxRivetingTime;
        public bool Rivet1ing;
        public bool Rivet1ingStop;
        public bool Rivet1ingOK;
        public bool Rivet1ingNOK;
        public bool Rivet1ingOK_SpeedJudgment;
        public bool Rivet1ingOK_PositionVariationJudgment;
        public bool Rivet1ingOK_TorqueJudgment;
        public bool Rivet1ingOK_PositionJudgment;
        public bool Rivet1ingNOK_OverTime;
        public bool Rivet1ingNOK_OverSpeed;
        public bool Rivet1ingNOK_OverPosition;
        public ushort Rivet1ingTime;
        public float Rivet1OKPositionRecord;
        public float Rivet1Force;
        public int Rivet1ForceP;
        public int Rivet1ForceI;
        public float Rivet1RotationalSpeed;
        public ushort Rivet1RotationalACCTime;
        public ushort Rivet1RotationalDECTime;
        public float Rivet1OKUpPosition;
        public float Rivet1OKDownPosition;
        public bool Rivet1OKSpeedJudgment;
        public float Rivet1OKSpeed;
        public bool Rivet1OKPositionVariationJudgment;
        public float Rivet1OKPositionVariation;
        public ushort Rivet1OKPositionVariationSamplintTime;
        public bool Rivet1OKTorqueJudgment;
        public float Rivet1OKTorque;
        public bool Rivet1OKPositionJudgment;
        public float Rivet1OKPosition;
        public float Rivet1MaxSpeed;
        public ushort Rivet1OverTime;
        public bool Rivet2ing;
        public bool Rivet2ingStop;
        public bool Rivet2ingOK;
        public bool Rivet2ingNOK;
        public bool Rivet2ingOK_SpeedJudgment;
        public bool Rivet2ingOK_PositionVariationJudgment;
        public bool Rivet2ingOK_TorqueJudgment;
        public bool Rivet2ingOK_PositionJudgment;
        public bool Rivet2ingNOK_OverTime;
        public bool Rivet2ingNOK_OverSpeed;
        public bool Rivet2ingNOK_OverPosition;
        public ushort Rivet2ingTime;
        public float Rivet2OKPositionRecord;
        public float Rivet2Force;
        public int Rivet2ForceP;
        public int Rivet2ForceI;
        public float Rivet2RotationalSpeed;
        public ushort Rivet2RotationalACCTime;
        public ushort Rivet2RotationalDECTime;
        public float Rivet2OKUpPosition;
        public float Rivet2OKDownPosition;
        public bool Rivet2OKSpeedJudgment;
        public float Rivet2OKSpeed;
        public bool Rivet2OKPositionVariationJudgment;
        public float Rivet2OKPositionVariation;
        public ushort Rivet2OKPositionVariationSamplintTime;
        public bool Rivet2OKTorqueJudgment;
        public float Rivet2OKTorque;
        public bool Rivet2OKPositionJudgment;
        public float Rivet2OKPosition;
        public float Rivet2MaxSpeed;
        public ushort Rivet2OverTime;
        public bool Rivet3ing;
        public bool Rivet3ingStop;
        public bool Rivet3ingOK;
        public bool Rivet3ingNOK;
        public bool Rivet3ingOK_SpeedJudgment;
        public bool Rivet3ingOK_PositionVariationJudgment;
        public bool Rivet3ingOK_TorqueJudgment;
        public bool Rivet3ingOK_PositionJudgment;
        public bool Rivet3ingNOK_OverTime;
        public bool Rivet3ingNOK_OverSpeed;
        public bool Rivet3ingNOK_OverPosition;
        public ushort Rivet3ingTime;
        public float Rivet3OKPositionRecord;
        public float Rivet3Force;
        public int Rivet3ForceP;
        public int Rivet3ForceI;
        public float Rivet3RotationalSpeed;
        public ushort Rivet3RotationalACCTime;
        public ushort Rivet3RotationalDECTime;
        public float Rivet3OKUpPosition;
        public float Rivet3OKDownPosition;
        public bool Rivet3OKSpeedJudgment;
        public float Rivet3OKSpeed;
        public bool Rivet3OKPositionVariationJudgment;
        public float Rivet3OKPositionVariation;
        public ushort Rivet3OKPositionVariationSamplintTime;
        public bool Rivet3OKTorqueJudgment;
        public float Rivet3OKTorque;
        public bool Rivet3OKPositionJudgment;
        public float Rivet3OKPosition;
        public float Rivet3MaxSpeed;
        public ushort Rivet3OverTime;



        public bool MEmgStop;
        public bool Exc_EmgStop;
        public bool biSwEmgStop;
        public bool biEbEmgStop;
        public bool biContactor1;
        public bool biContactor2;
        public bool biAxis1Ready;
        public bool biAxis2Ready;
        public bool biBtRun;
        public bool biBtReset;
        public bool biTotaInAirPresRch1;
        public bool biTotaInAirPresRch2;





        public bool RefFeedMachPushRivetValve;
        public bool RefFeedMachBlowRivetValve;
        public bool RefClampValve;
        public bool RefCachePlacePushRivetValve;
        public bool RefCachePlaceBlowRivetValve;
        public bool RefEnableVacuoValve;
        public bool RefDisableVacuoValve;
        public bool RefGunHeadBlowRivetValve;
        public bool RefPrePressureExtendValve;
        public bool RefPrePressureRetractValve;

 

        public bool biVacuoValueRch1;
        public bool btManualInhaleRivet;
        public bool RefVacuoValve_Manual;
        public bool btManualFeed;
        public bool btManualPrePress;
        public bool btManualRivet;
         

    }
    //[StructLayout(LayoutKind.Sequential, Pack = 4)]//8字节对齐
    public struct IhandleHMI
    {
        public int iHandleSysIsReady;
        public int iHandleSysAlarmActive;
        public int iHandleSysNotEmgStop;
        public int iHandleErrDoorOpen;
        public int iHandleSysManualMode;
        public int iHandleSysAutoMode;
        public int iHandleSysExcMode;
        public int iHandleSysDebugMode;
        public int iHandleSysStep;
        public int iHandleManualStep;
        public int iHandleAutoStep;
        public int iHandleExcStep;
        public int iHandleDebugStep;
        public int iHandleDataPressure;
        public int iHandleDataTorque;
        public int iHandleActVelo2;
        public int iHandleActVelo1;
        public int iHandleActPos2;
        public int iHandleMaxPressure;
        public int iHandleMaxTorque;
        public int iHandleTimer;
        public int iHandlestatus1;
        public int iHandlestatus2;
        public int iHandlestatus3;
        public int iHandlestatus4;
        public int iHandlestatus5;
        public int iHandlestatus6;
        public int iHandlestatus7;
        public int iHandlestatus8;
        public int iHandlebtDebug;
        public int iHandlebtMotorDebug;
        public int iHandlebtFeedTest;
        public int iHandleEnabled1;
        public int iHandleError1;
        public int iHandleJogVelocity1;
        public int iHandlebtManualJogF1;
        public int iHandlebtManualJogB1;
        public int iHandlebtManualPower1;
        public int iHandlebtReset1;
        public int iHandleEnabled2;
        public int iHandleError2;
        public int iHandleMotorDebug_Axis2SetVelo;
        public int iHandleMotorDebug_Axis2SetPos;
        public int iHandleMotorDebug_Axis2SwitchForce;
        public int iHandleMotorDebug_Axis2SetForce;
        public int iHandleMotorDebug_Axis2ForcePosLimit;
        public int iHandleMotorDebug_Axis2JOGMinus;
        public int iHandleMotorDebug_Axis2JOGPlus;
        public int iHandleMotorDebug_Axis2HOME;
        public int iHandleMotorDebug_Axis2PoStart;
        public int iHandleMotorDebug_Axis2ForceStart;
        public int iHandleMotorDebug_Axis2STOP;
        public int iHandleMotorDebug_Axis2Reset;
        public int iHandleFeeding;
        public int iHandleFeedingStop;
        public int iHandleFeedingOK;
        public int iHandleFeedingNOK;
        public int iHandleFeedingTime;
        public int iHandleMaxFeedingTime;
        public int iHandlebtFeed;
        public int iHandlebtFeedingTestStart_Stop;
        public int iHandlebtDay_Night;
        public int iHandleFeedMachModel;
        public int iHandlebtFeedMachPushRivetValve;
        public int iHandlebtFeedMachBlowRivetValve;
        public int iHandleFeedMachRivetOK;
        public int iHandleFeedMachPushRivetBasic;
        public int iHandleFeedMachPushRivetWork;
        public int iHandleFeedMachRivetOut;
        public int iHandleFeedMachLastCycleCounter;
        public int iHandleFeedMachNowCycleCounter;
        public int iHandleFeedMachRivetOutCounter;
        public int iHandlebtFeedMachLastCycleCounterClean;
        public int iHandlebtFeedMachNowCycleCounterClean;
        public int iHandlebtFeedMachRivetOutCounterClean;
        public int iHandleFeedMachNowCycleing;
        public int iHandleFeedMachBlowRivetOverTimeAlarm;
        public int iHandleFeedMachBlowRivetOverTimeReset;
        public int iHandleFeedMachRivetOutOverTimeAlarm;
        public int iHandleFeedMachRivetOutOverTimeReset;
        public int iHandleFeedMachRivetOutOverTime;
        public int iHandlebtClampValve;
        public int iHandlebtCachePlacePushRivetValve;
        public int iHandlebtCachePlaceBlowRivetValve;
        public int iHandlebtEnableVacuoValve;
        public int iHandlebtDisableVacuoValve;
        public int iHandlebtGunHeadBlowRivetValve;
        public int iHandlebtPrePressureExtendValve;
        public int iHandlebtPrePressureRetractValve;
        public int iHandleCachePlaceRivetIn;
        public int iHandleCachePlaceRivetOut;
        public int iHandleGunHeadRivetIn;
        public int iHandleCachePlaceRivetAt;
        public int iHandleClampWork;
        public int iHandleClampBasic;
        public int iHandleCachePlacePushRivetWork;
        public int iHandleCachePlacePushRivetBasic;
        public int iHandlePrePressureWork1;
        public int iHandlePrePressureBasic1;
        public int iHandlePrePressureWork2;
        public int iHandlePrePressureBasic2;
        public int iHandleVacuoValueRch1;
        public int iHandleLimitSwitchUp;
        public int iHandleLimitSwitchOrigin;
        public int iHandleLimitSwitchDown;
        public int iHandleGunLastCycleCounter;
        public int iHandleGunNowCycleCounter;
        public int iHandleCachePlaceRivetInCounter;
        public int iHandleRivetInCounter;
        public int iHandleRivetOutCounter;
        public int iHandleInhaleRivetOKCounter;
        public int iHandleInhaleRivetNOKCounter;
        public int iHandlebtCounterClear;
        public int iHandlebtGunLastCycleCounterClean;
        public int iHandlebtGunNowCycleCounterClean;
        public int iHandlebtCachePlaceRivetInCounterClean;
        public int iHandlebtCachePlaceRivetOutCounterClean;
        public int iHandlebtGunHeadRivetInCounterClean;
        public int iHandlebtInhaleRivetOKCounterClean;
        public int iHandlebtInhaleRivetNOKCounterClean;
        public int iHandlebtInhaleRivetActualCounterClean;
        public int iHandleGunNowCycleing;
        public int iHandleCachePlaceRivetInOverTimeAlarm;
        public int iHandleCachePlaceRivetInOverTimeReset;
        public int iHandleCachePlaceRivetAtOverTimeAlarm;
        public int iHandleCachePlaceRivetAtOverTimeReset;
        public int iHandleCachePlaceBlowRivetOverTimeAlarm;
        public int iHandleCachePlaceBlowRivetOverTimeReset;
        public int iHandleCachePlaceRivetOutOverTimeAlarm;
        public int iHandleCachePlaceRivetOutOverTimeReset;
        public int iHandleGunHeadRivetInOverTimeAlarm;
        public int iHandleGunHeadRivetInOverTimeReset;
        public int iHandleFeedingNOKLater_CycleContinue;
        public int iHandleInhaleRivetLater_DisableVacuoAlarm;
        public int iHandleInhaleRivetLater_DisableVacuoReset;
        public int iHandleEnableVacuoValveLater_SampleTime1;
        public int iHandleEnableVacuoValveLater_SampleTime2;
        public int iHandleVacuoRchLater_SampleTime;
        public int iHandleCachePlaceRivetInOverTime;
        public int iHandleCachePlaceRivetAtOverTime;
        public int iHandleCachePlaceRivetAtHeartbeatTime;
        public int iHandleCachePlaceRivetOutOverTime;
        public int iHandleGunHeadRivetInOverTime;
        public int iHandleGunHeadRivetIn_EnableVacuoValveDelayTime;
        public int iHandleFeedTest_InhaleRivetMaxTime;
        public int iHandleFeedTest_InhaleRivetIntervalTime;
        public int iHandleFeedTest_InhaleRivetMaxCounter;
        public int iHandlePrePressureSetValue;
        public int iHandleFeedPos1;
        public int iHandleFeedTest_InhaleRivetTargetPos;
        public int iHandleFeedTest_Velo1;
        public int iHandleFeedTest_Acc1;
        public int iHandleFeedTest_Dec1;
        public int iHandleFeedTest_Jerk1;
        public int iHandleFeedTest_Velo2;
        public int iHandleFeedTest_Acc2;
        public int iHandleFeedTest_Dec2;
        public int iHandleFeedTest_Jerk2;
        public int iHandleEnableVacuoValveLater_VacuoValue1;
        public int iHandleEnableVacuoValveLater_VacuoValue2;
        public int iHandleSingleCycleVacuoValue;
        public int iHandleEnableVacuoValve_VacuoRchTime;
        public int iHandleTestFeedingTime;
        public int iHandleInhaleRivetActualCounter;
        public int iHandleVacuoValue1;
        public int iHandlePrePressureRefValue;
        public int iHandlePrePressing;
        public int iHandlePrePressingStop;
        public int iHandlePrePressingOK;
        public int iHandlePrePressingNOK;
        public int iHandlePrePressingNOK_OverTime;
        public int iHandlePrePressingNOK_NOTVacuo;
        public int iHandlePrePressingNOK_OverPosition;
        public int iHandlePrePressingTime;
        public int iHandlePrePressOKPositionRecord;
        public int iHandlePrePressHighPosition;
        public int iHandlePrePressHighSpeed;
        public int iHandlePrePressLowPosition;
        public int iHandlePrePressLowSpeed;
        public int iHandlePrePressTouchForce;
        public int iHandlePrePressForce;
        public int iHandleMaxPrePressingTime;
        public int iHandleRiveting;
        public int iHandleRivetingStop;
        public int iHandleRivetingOK;
        public int iHandleRivetingNOK;
        public int iHandleRivetingTime;
        public int iHandleRivetOKPositionRecord;
        public int iHandleTechnicsNumber;
        public int iHandleMultistageId;
        public int iHandleMaxRivetingTime;
        public int iHandleRivet1ing;
        public int iHandleRivet1ingStop;
        public int iHandleRivet1ingOK;
        public int iHandleRivet1ingNOK;
        public int iHandleRivet1ingOK_SpeedJudgment;
        public int iHandleRivet1ingOK_PositionVariationJudgment;
        public int iHandleRivet1ingOK_TorqueJudgment;
        public int iHandleRivet1ingOK_PositionJudgment;
        public int iHandleRivet1ingNOK_OverTime;
        public int iHandleRivet1ingNOK_OverSpeed;
        public int iHandleRivet1ingNOK_OverPosition;
        public int iHandleRivet1ingTime;
        public int iHandleRivet1OKPositionRecord;
        public int iHandleRivet1Force;
        public int iHandleRivet1ForceP;
        public int iHandleRivet1ForceI;
        public int iHandleRivet1RotationalSpeed;
        public int iHandleRivet1RotationalACCTime;
        public int iHandleRivet1RotationalDECTime;
        public int iHandleRivet1OKUpPosition;
        public int iHandleRivet1OKDownPosition;
        public int iHandleRivet1OKSpeedJudgment;
        public int iHandleRivet1OKSpeed;
        public int iHandleRivet1OKPositionVariationJudgment;
        public int iHandleRivet1OKPositionVariation;
        public int iHandleRivet1OKPositionVariationSamplintTime;
        public int iHandleRivet1OKTorqueJudgment;
        public int iHandleRivet1OKTorque;
        public int iHandleRivet1OKPositionJudgment;
        public int iHandleRivet1OKPosition;
        public int iHandleRivet1MaxSpeed;
        public int iHandleRivet1OverTime;
        public int iHandleRivet2ing;
        public int iHandleRivet2ingStop;
        public int iHandleRivet2ingOK;
        public int iHandleRivet2ingNOK;
        public int iHandleRivet2ingOK_SpeedJudgment;
        public int iHandleRivet2ingOK_PositionVariationJudgment;
        public int iHandleRivet2ingOK_TorqueJudgment;
        public int iHandleRivet2ingOK_PositionJudgment;
        public int iHandleRivet2ingNOK_OverTime;
        public int iHandleRivet2ingNOK_OverSpeed;
        public int iHandleRivet2ingNOK_OverPosition;
        public int iHandleRivet2ingTime;
        public int iHandleRivet2OKPositionRecord;
        public int iHandleRivet2Force;
        public int iHandleRivet2ForceP;
        public int iHandleRivet2ForceI;
        public int iHandleRivet2RotationalSpeed;
        public int iHandleRivet2RotationalACCTime;
        public int iHandleRivet2RotationalDECTime;
        public int iHandleRivet2OKUpPosition;
        public int iHandleRivet2OKDownPosition;
        public int iHandleRivet2OKSpeedJudgment;
        public int iHandleRivet2OKSpeed;
        public int iHandleRivet2OKPositionVariationJudgment;
        public int iHandleRivet2OKPositionVariation;
        public int iHandleRivet2OKPositionVariationSamplintTime;
        public int iHandleRivet2OKTorqueJudgment;
        public int iHandleRivet2OKTorque;
        public int iHandleRivet2OKPositionJudgment;
        public int iHandleRivet2OKPosition;
        public int iHandleRivet2MaxSpeed;
        public int iHandleRivet2OverTime;
        public int iHandleRivet3ing;
        public int iHandleRivet3ingStop;
        public int iHandleRivet3ingOK;
        public int iHandleRivet3ingNOK;
        public int iHandleRivet3ingOK_SpeedJudgment;
        public int iHandleRivet3ingOK_PositionVariationJudgment;
        public int iHandleRivet3ingOK_TorqueJudgment;
        public int iHandleRivet3ingOK_PositionJudgment;
        public int iHandleRivet3ingNOK_OverTime;
        public int iHandleRivet3ingNOK_OverSpeed;
        public int iHandleRivet3ingNOK_OverPosition;
        public int iHandleRivet3ingTime;
        public int iHandleRivet3OKPositionRecord;
        public int iHandleRivet3Force;
        public int iHandleRivet3ForceP;
        public int iHandleRivet3ForceI;
        public int iHandleRivet3RotationalSpeed;
        public int iHandleRivet3RotationalACCTime;
        public int iHandleRivet3RotationalDECTime;
        public int iHandleRivet3OKUpPosition;
        public int iHandleRivet3OKDownPosition;
        public int iHandleRivet3OKSpeedJudgment;
        public int iHandleRivet3OKSpeed;
        public int iHandleRivet3OKPositionVariationJudgment;
        public int iHandleRivet3OKPositionVariation;
        public int iHandleRivet3OKPositionVariationSamplintTime;
        public int iHandleRivet3OKTorqueJudgment;
        public int iHandleRivet3OKTorque;
        public int iHandleRivet3OKPositionJudgment;
        public int iHandleRivet3OKPosition;
        public int iHandleRivet3MaxSpeed;
        public int iHandleRivet3OverTime;

        public int iHandleMEmgStop;
        public int iHandleExc_EmgStop;
        public int iHandlebiSwEmgStop;
        public int iHandlebiEbEmgStop;
        public int iHandlebiContactor1;
        public int iHandlebiContactor2;
        public int iHandlebiAxis1Ready;
        public int iHandlebiAxis2Ready;
        public int iHandlebiBtRun;
        public int iHandlebiBtReset;
        public int iHandlebiTotaInAirPresRch1;
        public int iHandlebiTotaInAirPresRch2;




        public int iHandleRefFeedMachPushRivetValve;
        public int iHandleRefFeedMachBlowRivetValve;
        public int iHandleRefClampValve;
        public int iHandleRefCachePlacePushRivetValve;
        public int iHandleRefCachePlaceBlowRivetValve;
        public int iHandleRefEnableVacuoValve;
        public int iHandleRefDisableVacuoValve;
        public int iHandleRefGunHeadBlowRivetValve;
        public int iHandleRefPrePressureExtendValve;
        public int iHandleRefPrePressureRetractValve;




        public int iHandlebiVacuoValueRch1;
        public int iHandlebtManualInhaleRivet;
        public int iHandleRefVacuoValve_Manual;
        public int iHandlebtManualFeed;
        public int iHandlebtManualPrePress;
        public int iHandlebtManualRivet;


    }



    #endregion

    public static class Beckhoff_PLC
    {
        public static TcAdsClient tcAdsClient;
        public static int iHandleStruct;//读取结构体句柄
        public static int iHandleArray;//读取数组句柄


        public static int iHandleTechnicsNumber;//工艺号句柄


        public static TestStruct sResult;//循环读取的结构体
        public static Cache1 cache1;//包含数组的结构体

        public static HMIVar HMI_Var;//包含数组的结构体
        public static IhandleHMI iHandle_HMI;//包含数组的结构体


        public static int TechnicsNumber = 0;//工艺号

        //创建通讯状态标志位，只在第一次执行时候做了判断
        public static bool CommOK = false;//PLC连接成功的标志

        //创建数据写入的标志位(半双工通讯不能同时读和写)
        public static bool IsWriting = false;
        public static bool IsReadingArr = false;//读取结构体数组
        public static bool IsReadingArrOK;

        public static string MachineType = "0";//送钉机类型


        public static List<ProcessData> ProcessDataList = new List<ProcessData>();//曲线数据集合

        public static List<float> Y1 = new List<float>();
        public static List<float> Y2 = new List<float>();
        public static List<float> Y3 = new List<float>();
        public static List<float> Y4 = new List<float>();

        public static List<float> X = new List<float>();
        public static List<float> X1 = new List<float>();//存储0-5000ms
        public static List<float> X2 = new List<float>();

        public static List<float> AY1 = new List<float>();//历史曲线显示使用
        public static List<float> AY2 = new List<float>();
        public static List<float> AY3 = new List<float>();
        public static List<float> AY4 = new List<float>();

        public static List<float> AX = new List<float>();
        public static List<float> AX1 = new List<float>();//存储0-5000ms
        public static List<float> AX2 = new List<float>();
        public static List<ushort> XID = new List<ushort>(); //曲线数据序列号
        public static List<float> BX = new List<float>();
        public static List<float> UpperError = new List<float>();
        public static List<float> LowerError = new List<float>();

        public static string AmsNetID = "5.95.56.241.1.1";//PLC的AMSNetID
        //public static string AmsNetID = "192.168.9.149.1.1";//本机的AMSNetID

        public static Thread t = new Thread(Communication);
        //(是否需添加循环读取的间隔时间，例如使用Thread.Sleep(1000); continue;直接进行下轮循环 ，或者Timer控件）

        #region 开启线程循环执行ReadStruct()
        /// <summary>
        /// 开启线程循环读取
        /// </summary>
        public static void Communication()
        {
            t.IsBackground = true;
            while (true)
            {
                if (IsWriting == false && IsReadingArr == false)
                {
                    //ReadStruct();//将结构体数据分别保存到集合
                    ReadHMI03();
                    ReadTechnicsNumber();
                }
                if (IsWriting == true)
                {
                    Thread.Sleep(200);
                }
                if (IsReadingArr == true)
                {
                    Thread.Sleep(500);
                }
            }
        }
        #endregion        

        public static string ReadAmsNetID(string fullPath)
        {
            string res = "";
            string path = fullPath; // 替换为你的CSV文件路径
            string[] arr = new string[10];
            try
            {
                using (FileStream fs = File.Open(path, FileMode.Open, FileAccess.Read, FileShare.Read))
                using (StreamReader reader = new StreamReader(fs))
                {
                    res = reader.ReadLine();
                }
                arr = res.Split(',');
                res = arr[0];
                Beckhoff_PLC.AmsNetID = res;
            }
            catch
            {
                return "";
            }
            return res;
        }


        #region 建立连接,取得句柄
        public static bool CreateHandle()  //点击创建ads连接按钮触发
        {
            string AmsNetIDtemp = "";
            tcAdsClient = new TcAdsClient();
            try
            {
                AmsNetIDtemp = ReadAmsNetID(System.Environment.CurrentDirectory + "\\ConfigFile\\AmsNetID.csv");
                Beckhoff_PLC.MachineType = Toexcel.ReadMachineType(System.Environment.CurrentDirectory + "\\ConfigFile\\AmsNetID.csv");
                if (AmsNetIDtemp != "" && AmsNetIDtemp != null)
                {
                    tcAdsClient.Connect(AmsNetIDtemp, 851);

                }
                else
                {
                    tcAdsClient.Connect(AmsNetID, 851);
                }



                //tcAdsClient.Connect(851);
                tcAdsClient.Timeout = 500;//设置超时时间50ms,不设置默认时间是5s
                 //iHandleStruct = tcAdsClient.CreateVariableHandle(".HMI");
                iHandleArray = tcAdsClient.CreateVariableHandle("_04_Cache.ArchivedData");




                iHandle_HMI.iHandleSysIsReady = tcAdsClient.CreateVariableHandle("_03_HMI.SysIsReady");
                iHandle_HMI.iHandleSysAlarmActive = tcAdsClient.CreateVariableHandle("_03_HMI.SysAlarmActive");
                iHandle_HMI.iHandleSysNotEmgStop = tcAdsClient.CreateVariableHandle("_03_HMI.SysNotEmgStop");
                iHandle_HMI.iHandleErrDoorOpen = tcAdsClient.CreateVariableHandle("_03_HMI.ErrDoorOpen");
                iHandle_HMI.iHandleSysManualMode = tcAdsClient.CreateVariableHandle("_03_HMI.SysManualMode");
                iHandle_HMI.iHandleSysAutoMode = tcAdsClient.CreateVariableHandle("_03_HMI.SysAutoMode");
                iHandle_HMI.iHandleSysExcMode = tcAdsClient.CreateVariableHandle("_03_HMI.SysExcMode");
                iHandle_HMI.iHandleSysDebugMode = tcAdsClient.CreateVariableHandle("_03_HMI.SysDebugMode");
                iHandle_HMI.iHandleSysStep = tcAdsClient.CreateVariableHandle("_03_HMI.SysStep");
                iHandle_HMI.iHandleManualStep = tcAdsClient.CreateVariableHandle("_03_HMI.ManualStep");
                iHandle_HMI.iHandleAutoStep = tcAdsClient.CreateVariableHandle("_03_HMI.AutoStep");
                iHandle_HMI.iHandleExcStep = tcAdsClient.CreateVariableHandle("_03_HMI.ExcStep");
                iHandle_HMI.iHandleDebugStep = tcAdsClient.CreateVariableHandle("_03_HMI.DebugStep");
                iHandle_HMI.iHandleDataPressure = tcAdsClient.CreateVariableHandle("_03_HMI.DataPressure");
                iHandle_HMI.iHandleDataTorque = tcAdsClient.CreateVariableHandle("_03_HMI.DataTorque");
                iHandle_HMI.iHandleActVelo2 = tcAdsClient.CreateVariableHandle("_03_HMI.ActVelo2");
                iHandle_HMI.iHandleActVelo1 = tcAdsClient.CreateVariableHandle("_03_HMI.ActVelo1");
                iHandle_HMI.iHandleActPos2 = tcAdsClient.CreateVariableHandle("_03_HMI.ActPos2");
                iHandle_HMI.iHandleMaxPressure = tcAdsClient.CreateVariableHandle("_03_HMI.MaxPressure");
                iHandle_HMI.iHandleMaxTorque = tcAdsClient.CreateVariableHandle("_03_HMI.MaxTorque");
                iHandle_HMI.iHandleTimer = tcAdsClient.CreateVariableHandle("_03_HMI.Timer");
                iHandle_HMI.iHandlestatus1 = tcAdsClient.CreateVariableHandle("_03_HMI.status1");
                iHandle_HMI.iHandlestatus2 = tcAdsClient.CreateVariableHandle("_03_HMI.status2");
                iHandle_HMI.iHandlestatus3 = tcAdsClient.CreateVariableHandle("_03_HMI.status3");
                iHandle_HMI.iHandlestatus4 = tcAdsClient.CreateVariableHandle("_03_HMI.status4");
                iHandle_HMI.iHandlestatus5 = tcAdsClient.CreateVariableHandle("_03_HMI.status5");
                iHandle_HMI.iHandlestatus6 = tcAdsClient.CreateVariableHandle("_03_HMI.status6");
                iHandle_HMI.iHandlestatus7 = tcAdsClient.CreateVariableHandle("_03_HMI.status7");
                iHandle_HMI.iHandlestatus8 = tcAdsClient.CreateVariableHandle("_03_HMI.status8");
                iHandle_HMI.iHandlebtDebug = tcAdsClient.CreateVariableHandle("_03_HMI.btDebug");
                iHandle_HMI.iHandlebtMotorDebug = tcAdsClient.CreateVariableHandle("_03_HMI.btMotorDebug");
                iHandle_HMI.iHandlebtFeedTest = tcAdsClient.CreateVariableHandle("_03_HMI.btFeedTest");
                iHandle_HMI.iHandleEnabled1 = tcAdsClient.CreateVariableHandle("_03_HMI.Enabled1");
                iHandle_HMI.iHandleError1 = tcAdsClient.CreateVariableHandle("_03_HMI.Error1");
                iHandle_HMI.iHandleJogVelocity1 = tcAdsClient.CreateVariableHandle("_03_HMI.JogVelocity1");
                iHandle_HMI.iHandlebtManualJogF1 = tcAdsClient.CreateVariableHandle("_03_HMI.btManualJogF1");
                iHandle_HMI.iHandlebtManualJogB1 = tcAdsClient.CreateVariableHandle("_03_HMI.btManualJogB1");
                iHandle_HMI.iHandlebtManualPower1 = tcAdsClient.CreateVariableHandle("_03_HMI.btManualPower1");
                iHandle_HMI.iHandlebtReset1 = tcAdsClient.CreateVariableHandle("_03_HMI.btReset1");
                iHandle_HMI.iHandleEnabled2 = tcAdsClient.CreateVariableHandle("_03_HMI.Enabled2");
                iHandle_HMI.iHandleError2 = tcAdsClient.CreateVariableHandle("_03_HMI.Error2");
                iHandle_HMI.iHandleMotorDebug_Axis2SetVelo = tcAdsClient.CreateVariableHandle("_03_HMI.MotorDebug_Axis2SetVelo");
                iHandle_HMI.iHandleMotorDebug_Axis2SetPos = tcAdsClient.CreateVariableHandle("_03_HMI.MotorDebug_Axis2SetPos");
                iHandle_HMI.iHandleMotorDebug_Axis2SwitchForce = tcAdsClient.CreateVariableHandle("_03_HMI.MotorDebug_Axis2SwitchForce");
                iHandle_HMI.iHandleMotorDebug_Axis2SetForce = tcAdsClient.CreateVariableHandle("_03_HMI.MotorDebug_Axis2SetForce");
                iHandle_HMI.iHandleMotorDebug_Axis2ForcePosLimit = tcAdsClient.CreateVariableHandle("_03_HMI.MotorDebug_Axis2ForcePosLimit");
                iHandle_HMI.iHandleMotorDebug_Axis2JOGMinus = tcAdsClient.CreateVariableHandle("_03_HMI.MotorDebug_Axis2JOGMinus");
                iHandle_HMI.iHandleMotorDebug_Axis2JOGPlus = tcAdsClient.CreateVariableHandle("_03_HMI.MotorDebug_Axis2JOGPlus");
                iHandle_HMI.iHandleMotorDebug_Axis2HOME = tcAdsClient.CreateVariableHandle("_03_HMI.MotorDebug_Axis2HOME");
                iHandle_HMI.iHandleMotorDebug_Axis2PoStart = tcAdsClient.CreateVariableHandle("_03_HMI.MotorDebug_Axis2PoStart");
                iHandle_HMI.iHandleMotorDebug_Axis2ForceStart = tcAdsClient.CreateVariableHandle("_03_HMI.MotorDebug_Axis2ForceStart");
                iHandle_HMI.iHandleMotorDebug_Axis2STOP = tcAdsClient.CreateVariableHandle("_03_HMI.MotorDebug_Axis2STOP");
                iHandle_HMI.iHandleMotorDebug_Axis2Reset = tcAdsClient.CreateVariableHandle("_03_HMI.MotorDebug_Axis2Reset");
                iHandle_HMI.iHandleFeeding = tcAdsClient.CreateVariableHandle("_03_HMI.Feeding");
                iHandle_HMI.iHandleFeedingStop = tcAdsClient.CreateVariableHandle("_03_HMI.FeedingStop");
                iHandle_HMI.iHandleFeedingOK = tcAdsClient.CreateVariableHandle("_03_HMI.FeedingOK");
                iHandle_HMI.iHandleFeedingNOK = tcAdsClient.CreateVariableHandle("_03_HMI.FeedingNOK");
                iHandle_HMI.iHandleFeedingTime = tcAdsClient.CreateVariableHandle("_03_HMI.FeedingTime");
                iHandle_HMI.iHandleMaxFeedingTime = tcAdsClient.CreateVariableHandle("_03_HMI.MaxFeedingTime");
                iHandle_HMI.iHandlebtFeed = tcAdsClient.CreateVariableHandle("_03_HMI.btFeed");
                iHandle_HMI.iHandlebtFeedingTestStart_Stop = tcAdsClient.CreateVariableHandle("_03_HMI.btFeedingTestStart_Stop");
                iHandle_HMI.iHandlebtDay_Night = tcAdsClient.CreateVariableHandle("_03_HMI.btDay_Night");
                iHandle_HMI.iHandleFeedMachModel = tcAdsClient.CreateVariableHandle("_03_HMI.FeedMachModel");
                iHandle_HMI.iHandlebtFeedMachPushRivetValve = tcAdsClient.CreateVariableHandle("_03_HMI.btFeedMachPushRivetValve");
                iHandle_HMI.iHandlebtFeedMachBlowRivetValve = tcAdsClient.CreateVariableHandle("_03_HMI.btFeedMachBlowRivetValve");
                iHandle_HMI.iHandleFeedMachRivetOK = tcAdsClient.CreateVariableHandle("_03_HMI.FeedMachRivetOK");
                iHandle_HMI.iHandleFeedMachPushRivetBasic = tcAdsClient.CreateVariableHandle("_03_HMI.FeedMachPushRivetBasic");
                iHandle_HMI.iHandleFeedMachPushRivetWork = tcAdsClient.CreateVariableHandle("_03_HMI.FeedMachPushRivetWork");
                iHandle_HMI.iHandleFeedMachRivetOut = tcAdsClient.CreateVariableHandle("_03_HMI.FeedMachRivetOut");
                iHandle_HMI.iHandleFeedMachLastCycleCounter = tcAdsClient.CreateVariableHandle("_03_HMI.FeedMachLastCycleCounter");
                iHandle_HMI.iHandleFeedMachNowCycleCounter = tcAdsClient.CreateVariableHandle("_03_HMI.FeedMachNowCycleCounter");
                iHandle_HMI.iHandleFeedMachRivetOutCounter = tcAdsClient.CreateVariableHandle("_03_HMI.FeedMachRivetOutCounter");
                iHandle_HMI.iHandlebtFeedMachLastCycleCounterClean = tcAdsClient.CreateVariableHandle("_03_HMI.btFeedMachLastCycleCounterClean");
                iHandle_HMI.iHandlebtFeedMachNowCycleCounterClean = tcAdsClient.CreateVariableHandle("_03_HMI.btFeedMachNowCycleCounterClean");
                iHandle_HMI.iHandlebtFeedMachRivetOutCounterClean = tcAdsClient.CreateVariableHandle("_03_HMI.btFeedMachRivetOutCounterClean");
                iHandle_HMI.iHandleFeedMachNowCycleing = tcAdsClient.CreateVariableHandle("_03_HMI.FeedMachNowCycleing");
                iHandle_HMI.iHandleFeedMachBlowRivetOverTimeAlarm = tcAdsClient.CreateVariableHandle("_03_HMI.FeedMachBlowRivetOverTimeAlarm");
                iHandle_HMI.iHandleFeedMachBlowRivetOverTimeReset = tcAdsClient.CreateVariableHandle("_03_HMI.FeedMachBlowRivetOverTimeReset");
                iHandle_HMI.iHandleFeedMachRivetOutOverTimeAlarm = tcAdsClient.CreateVariableHandle("_03_HMI.FeedMachRivetOutOverTimeAlarm");
                iHandle_HMI.iHandleFeedMachRivetOutOverTimeReset = tcAdsClient.CreateVariableHandle("_03_HMI.FeedMachRivetOutOverTimeReset");
                iHandle_HMI.iHandleFeedMachRivetOutOverTime = tcAdsClient.CreateVariableHandle("_03_HMI.FeedMachRivetOutOverTime");
                iHandle_HMI.iHandlebtClampValve = tcAdsClient.CreateVariableHandle("_03_HMI.btClampValve");
                iHandle_HMI.iHandlebtCachePlacePushRivetValve = tcAdsClient.CreateVariableHandle("_03_HMI.btCachePlacePushRivetValve");
                iHandle_HMI.iHandlebtCachePlaceBlowRivetValve = tcAdsClient.CreateVariableHandle("_03_HMI.btCachePlaceBlowRivetValve");
                iHandle_HMI.iHandlebtEnableVacuoValve = tcAdsClient.CreateVariableHandle("_03_HMI.btEnableVacuoValve");
                iHandle_HMI.iHandlebtDisableVacuoValve = tcAdsClient.CreateVariableHandle("_03_HMI.btDisableVacuoValve");
                iHandle_HMI.iHandlebtGunHeadBlowRivetValve = tcAdsClient.CreateVariableHandle("_03_HMI.btGunHeadBlowRivetValve");
                iHandle_HMI.iHandlebtPrePressureExtendValve = tcAdsClient.CreateVariableHandle("_03_HMI.btPrePressureExtendValve");
                iHandle_HMI.iHandlebtPrePressureRetractValve = tcAdsClient.CreateVariableHandle("_03_HMI.btPrePressureRetractValve");
                iHandle_HMI.iHandleCachePlaceRivetIn = tcAdsClient.CreateVariableHandle("_03_HMI.CachePlaceRivetIn");
                iHandle_HMI.iHandleCachePlaceRivetOut = tcAdsClient.CreateVariableHandle("_03_HMI.CachePlaceRivetOut");
                iHandle_HMI.iHandleGunHeadRivetIn = tcAdsClient.CreateVariableHandle("_03_HMI.GunHeadRivetIn");
                iHandle_HMI.iHandleCachePlaceRivetAt = tcAdsClient.CreateVariableHandle("_03_HMI.CachePlaceRivetAt");
                iHandle_HMI.iHandleClampWork = tcAdsClient.CreateVariableHandle("_03_HMI.ClampWork");
                iHandle_HMI.iHandleClampBasic = tcAdsClient.CreateVariableHandle("_03_HMI.ClampBasic");
                iHandle_HMI.iHandleCachePlacePushRivetWork = tcAdsClient.CreateVariableHandle("_03_HMI.CachePlacePushRivetWork");
                iHandle_HMI.iHandleCachePlacePushRivetBasic = tcAdsClient.CreateVariableHandle("_03_HMI.CachePlacePushRivetBasic");
                iHandle_HMI.iHandlePrePressureWork1 = tcAdsClient.CreateVariableHandle("_03_HMI.PrePressureWork1");
                iHandle_HMI.iHandlePrePressureBasic1 = tcAdsClient.CreateVariableHandle("_03_HMI.PrePressureBasic1");
                iHandle_HMI.iHandlePrePressureWork2 = tcAdsClient.CreateVariableHandle("_03_HMI.PrePressureWork2");
                iHandle_HMI.iHandlePrePressureBasic2 = tcAdsClient.CreateVariableHandle("_03_HMI.PrePressureBasic2");
                iHandle_HMI.iHandleVacuoValueRch1 = tcAdsClient.CreateVariableHandle("_03_HMI.VacuoValueRch1");
                iHandle_HMI.iHandleLimitSwitchUp = tcAdsClient.CreateVariableHandle("_03_HMI.LimitSwitchUp");
                iHandle_HMI.iHandleLimitSwitchOrigin = tcAdsClient.CreateVariableHandle("_03_HMI.LimitSwitchOrigin");
                iHandle_HMI.iHandleLimitSwitchDown = tcAdsClient.CreateVariableHandle("_03_HMI.LimitSwitchDown");
                iHandle_HMI.iHandleGunLastCycleCounter = tcAdsClient.CreateVariableHandle("_03_HMI.GunLastCycleCounter");
                iHandle_HMI.iHandleGunNowCycleCounter = tcAdsClient.CreateVariableHandle("_03_HMI.GunNowCycleCounter");
                iHandle_HMI.iHandleCachePlaceRivetInCounter = tcAdsClient.CreateVariableHandle("_03_HMI.CachePlaceRivetInCounter");
                iHandle_HMI.iHandleRivetInCounter = tcAdsClient.CreateVariableHandle("_03_HMI.RivetInCounter");
                iHandle_HMI.iHandleRivetOutCounter = tcAdsClient.CreateVariableHandle("_03_HMI.RivetOutCounter");
                iHandle_HMI.iHandleInhaleRivetOKCounter = tcAdsClient.CreateVariableHandle("_03_HMI.InhaleRivetOKCounter");
                iHandle_HMI.iHandleInhaleRivetNOKCounter = tcAdsClient.CreateVariableHandle("_03_HMI.InhaleRivetNOKCounter");
                iHandle_HMI.iHandlebtCounterClear = tcAdsClient.CreateVariableHandle("_03_HMI.btCounterClear");
                iHandle_HMI.iHandlebtGunLastCycleCounterClean = tcAdsClient.CreateVariableHandle("_03_HMI.btGunLastCycleCounterClean");
                iHandle_HMI.iHandlebtGunNowCycleCounterClean = tcAdsClient.CreateVariableHandle("_03_HMI.btGunNowCycleCounterClean");
                iHandle_HMI.iHandlebtCachePlaceRivetInCounterClean = tcAdsClient.CreateVariableHandle("_03_HMI.btCachePlaceRivetInCounterClean");
                iHandle_HMI.iHandlebtCachePlaceRivetOutCounterClean = tcAdsClient.CreateVariableHandle("_03_HMI.btCachePlaceRivetOutCounterClean");
                iHandle_HMI.iHandlebtGunHeadRivetInCounterClean = tcAdsClient.CreateVariableHandle("_03_HMI.btGunHeadRivetInCounterClean");
                iHandle_HMI.iHandlebtInhaleRivetOKCounterClean = tcAdsClient.CreateVariableHandle("_03_HMI.btInhaleRivetOKCounterClean");
                iHandle_HMI.iHandlebtInhaleRivetNOKCounterClean = tcAdsClient.CreateVariableHandle("_03_HMI.btInhaleRivetNOKCounterClean");
                iHandle_HMI.iHandlebtInhaleRivetActualCounterClean = tcAdsClient.CreateVariableHandle("_03_HMI.btInhaleRivetActualCounterClean");
                iHandle_HMI.iHandleGunNowCycleing = tcAdsClient.CreateVariableHandle("_03_HMI.GunNowCycleing");
                iHandle_HMI.iHandleCachePlaceRivetInOverTimeAlarm = tcAdsClient.CreateVariableHandle("_03_HMI.CachePlaceRivetInOverTimeAlarm");
                iHandle_HMI.iHandleCachePlaceRivetInOverTimeReset = tcAdsClient.CreateVariableHandle("_03_HMI.CachePlaceRivetInOverTimeReset");
                iHandle_HMI.iHandleCachePlaceRivetAtOverTimeAlarm = tcAdsClient.CreateVariableHandle("_03_HMI.CachePlaceRivetAtOverTimeAlarm");
                iHandle_HMI.iHandleCachePlaceRivetAtOverTimeReset = tcAdsClient.CreateVariableHandle("_03_HMI.CachePlaceRivetAtOverTimeReset");
                iHandle_HMI.iHandleCachePlaceBlowRivetOverTimeAlarm = tcAdsClient.CreateVariableHandle("_03_HMI.CachePlaceBlowRivetOverTimeAlarm");
                iHandle_HMI.iHandleCachePlaceBlowRivetOverTimeReset = tcAdsClient.CreateVariableHandle("_03_HMI.CachePlaceBlowRivetOverTimeReset");
                iHandle_HMI.iHandleCachePlaceRivetOutOverTimeAlarm = tcAdsClient.CreateVariableHandle("_03_HMI.CachePlaceRivetOutOverTimeAlarm");
                iHandle_HMI.iHandleCachePlaceRivetOutOverTimeReset = tcAdsClient.CreateVariableHandle("_03_HMI.CachePlaceRivetOutOverTimeReset");
                iHandle_HMI.iHandleGunHeadRivetInOverTimeAlarm = tcAdsClient.CreateVariableHandle("_03_HMI.GunHeadRivetInOverTimeAlarm");
                iHandle_HMI.iHandleGunHeadRivetInOverTimeReset = tcAdsClient.CreateVariableHandle("_03_HMI.GunHeadRivetInOverTimeReset");
                iHandle_HMI.iHandleFeedingNOKLater_CycleContinue = tcAdsClient.CreateVariableHandle("_03_HMI.FeedingNOKLater_CycleContinue");
                iHandle_HMI.iHandleInhaleRivetLater_DisableVacuoAlarm = tcAdsClient.CreateVariableHandle("_03_HMI.InhaleRivetLater_DisableVacuoAlarm");
                iHandle_HMI.iHandleInhaleRivetLater_DisableVacuoReset = tcAdsClient.CreateVariableHandle("_03_HMI.InhaleRivetLater_DisableVacuoReset");
                iHandle_HMI.iHandleEnableVacuoValveLater_SampleTime1 = tcAdsClient.CreateVariableHandle("_03_HMI.EnableVacuoValveLater_SampleTime1");
                iHandle_HMI.iHandleEnableVacuoValveLater_SampleTime2 = tcAdsClient.CreateVariableHandle("_03_HMI.EnableVacuoValveLater_SampleTime2");
                iHandle_HMI.iHandleVacuoRchLater_SampleTime = tcAdsClient.CreateVariableHandle("_03_HMI.VacuoRchLater_SampleTime");
                iHandle_HMI.iHandleCachePlaceRivetInOverTime = tcAdsClient.CreateVariableHandle("_03_HMI.CachePlaceRivetInOverTime");
                iHandle_HMI.iHandleCachePlaceRivetAtOverTime = tcAdsClient.CreateVariableHandle("_03_HMI.CachePlaceRivetAtOverTime");
                iHandle_HMI.iHandleCachePlaceRivetAtHeartbeatTime = tcAdsClient.CreateVariableHandle("_03_HMI.CachePlaceRivetAtHeartbeatTime");
                iHandle_HMI.iHandleCachePlaceRivetOutOverTime = tcAdsClient.CreateVariableHandle("_03_HMI.CachePlaceRivetOutOverTime");
                iHandle_HMI.iHandleGunHeadRivetInOverTime = tcAdsClient.CreateVariableHandle("_03_HMI.GunHeadRivetInOverTime");
                iHandle_HMI.iHandleGunHeadRivetIn_EnableVacuoValveDelayTime = tcAdsClient.CreateVariableHandle("_03_HMI.GunHeadRivetIn_EnableVacuoValveDelayTime");
                iHandle_HMI.iHandleFeedTest_InhaleRivetMaxTime = tcAdsClient.CreateVariableHandle("_03_HMI.FeedTest_InhaleRivetMaxTime");
                iHandle_HMI.iHandleFeedTest_InhaleRivetIntervalTime = tcAdsClient.CreateVariableHandle("_03_HMI.FeedTest_InhaleRivetIntervalTime");
                iHandle_HMI.iHandleFeedTest_InhaleRivetMaxCounter = tcAdsClient.CreateVariableHandle("_03_HMI.FeedTest_InhaleRivetMaxCounter");
                iHandle_HMI.iHandlePrePressureSetValue = tcAdsClient.CreateVariableHandle("_03_HMI.PrePressureSetValue");
                iHandle_HMI.iHandleFeedPos1 = tcAdsClient.CreateVariableHandle("_03_HMI.FeedPos1");
                iHandle_HMI.iHandleFeedTest_InhaleRivetTargetPos = tcAdsClient.CreateVariableHandle("_03_HMI.FeedTest_InhaleRivetTargetPos");
                iHandle_HMI.iHandleFeedTest_Velo1 = tcAdsClient.CreateVariableHandle("_03_HMI.FeedTest_Velo1");
                iHandle_HMI.iHandleFeedTest_Acc1 = tcAdsClient.CreateVariableHandle("_03_HMI.FeedTest_Acc1");
                iHandle_HMI.iHandleFeedTest_Dec1 = tcAdsClient.CreateVariableHandle("_03_HMI.FeedTest_Dec1");
                iHandle_HMI.iHandleFeedTest_Jerk1 = tcAdsClient.CreateVariableHandle("_03_HMI.FeedTest_Jerk1");
                iHandle_HMI.iHandleFeedTest_Velo2 = tcAdsClient.CreateVariableHandle("_03_HMI.FeedTest_Velo2");
                iHandle_HMI.iHandleFeedTest_Acc2 = tcAdsClient.CreateVariableHandle("_03_HMI.FeedTest_Acc2");
                iHandle_HMI.iHandleFeedTest_Dec2 = tcAdsClient.CreateVariableHandle("_03_HMI.FeedTest_Dec2");
                iHandle_HMI.iHandleFeedTest_Jerk2 = tcAdsClient.CreateVariableHandle("_03_HMI.FeedTest_Jerk2");
                iHandle_HMI.iHandleEnableVacuoValveLater_VacuoValue1 = tcAdsClient.CreateVariableHandle("_03_HMI.EnableVacuoValveLater_VacuoValue1");
                iHandle_HMI.iHandleEnableVacuoValveLater_VacuoValue2 = tcAdsClient.CreateVariableHandle("_03_HMI.EnableVacuoValveLater_VacuoValue2");
                iHandle_HMI.iHandleSingleCycleVacuoValue = tcAdsClient.CreateVariableHandle("_03_HMI.SingleCycleVacuoValue");
                iHandle_HMI.iHandleEnableVacuoValve_VacuoRchTime = tcAdsClient.CreateVariableHandle("_03_HMI.EnableVacuoValve_VacuoRchTime");
                iHandle_HMI.iHandleTestFeedingTime = tcAdsClient.CreateVariableHandle("_03_HMI.TestFeedingTime");
                iHandle_HMI.iHandleInhaleRivetActualCounter = tcAdsClient.CreateVariableHandle("_03_HMI.InhaleRivetActualCounter");
                iHandle_HMI.iHandleVacuoValue1 = tcAdsClient.CreateVariableHandle("_03_HMI.VacuoValue1");
                iHandle_HMI.iHandlePrePressureRefValue = tcAdsClient.CreateVariableHandle("_03_HMI.PrePressureRefValue");
                iHandle_HMI.iHandlePrePressing = tcAdsClient.CreateVariableHandle("_03_HMI.PrePressing");
                iHandle_HMI.iHandlePrePressingStop = tcAdsClient.CreateVariableHandle("_03_HMI.PrePressingStop");
                iHandle_HMI.iHandlePrePressingOK = tcAdsClient.CreateVariableHandle("_03_HMI.PrePressingOK");
                iHandle_HMI.iHandlePrePressingNOK = tcAdsClient.CreateVariableHandle("_03_HMI.PrePressingNOK");
                iHandle_HMI.iHandlePrePressingNOK_OverTime = tcAdsClient.CreateVariableHandle("_03_HMI.PrePressingNOK_OverTime");
                iHandle_HMI.iHandlePrePressingNOK_NOTVacuo = tcAdsClient.CreateVariableHandle("_03_HMI.PrePressingNOK_NOTVacuo");
                iHandle_HMI.iHandlePrePressingNOK_OverPosition = tcAdsClient.CreateVariableHandle("_03_HMI.PrePressingNOK_OverPosition");
                iHandle_HMI.iHandlePrePressingTime = tcAdsClient.CreateVariableHandle("_03_HMI.PrePressingTime");
                iHandle_HMI.iHandlePrePressOKPositionRecord = tcAdsClient.CreateVariableHandle("_03_HMI.PrePressOKPositionRecord");
                iHandle_HMI.iHandlePrePressHighPosition = tcAdsClient.CreateVariableHandle("_03_HMI.PrePressHighPosition");
                iHandle_HMI.iHandlePrePressHighSpeed = tcAdsClient.CreateVariableHandle("_03_HMI.PrePressHighSpeed");
                iHandle_HMI.iHandlePrePressLowPosition = tcAdsClient.CreateVariableHandle("_03_HMI.PrePressLowPosition");
                iHandle_HMI.iHandlePrePressLowSpeed = tcAdsClient.CreateVariableHandle("_03_HMI.PrePressLowSpeed");
                iHandle_HMI.iHandlePrePressTouchForce = tcAdsClient.CreateVariableHandle("_03_HMI.PrePressTouchForce");
                iHandle_HMI.iHandlePrePressForce = tcAdsClient.CreateVariableHandle("_03_HMI.PrePressForce");
                iHandle_HMI.iHandleMaxPrePressingTime = tcAdsClient.CreateVariableHandle("_03_HMI.MaxPrePressingTime");
                iHandle_HMI.iHandleRiveting = tcAdsClient.CreateVariableHandle("_03_HMI.Riveting");
                iHandle_HMI.iHandleRivetingStop = tcAdsClient.CreateVariableHandle("_03_HMI.RivetingStop");
                iHandle_HMI.iHandleRivetingOK = tcAdsClient.CreateVariableHandle("_03_HMI.RivetingOK");
                iHandle_HMI.iHandleRivetingNOK = tcAdsClient.CreateVariableHandle("_03_HMI.RivetingNOK");
                iHandle_HMI.iHandleRivetingTime = tcAdsClient.CreateVariableHandle("_03_HMI.RivetingTime");
                iHandle_HMI.iHandleRivetOKPositionRecord = tcAdsClient.CreateVariableHandle("_03_HMI.RivetOKPositionRecord");
                iHandle_HMI.iHandleTechnicsNumber = tcAdsClient.CreateVariableHandle("_03_HMI.TechnicsNumber");
                iHandle_HMI.iHandleMultistageId = tcAdsClient.CreateVariableHandle("_03_HMI.MultistageId");
                iHandle_HMI.iHandleMaxRivetingTime = tcAdsClient.CreateVariableHandle("_03_HMI.MaxRivetingTime");
                iHandle_HMI.iHandleRivet1ing = tcAdsClient.CreateVariableHandle("_03_HMI.Rivet1ing");
                iHandle_HMI.iHandleRivet1ingStop = tcAdsClient.CreateVariableHandle("_03_HMI.Rivet1ingStop");
                iHandle_HMI.iHandleRivet1ingOK = tcAdsClient.CreateVariableHandle("_03_HMI.Rivet1ingOK");
                iHandle_HMI.iHandleRivet1ingNOK = tcAdsClient.CreateVariableHandle("_03_HMI.Rivet1ingNOK");
                iHandle_HMI.iHandleRivet1ingOK_SpeedJudgment = tcAdsClient.CreateVariableHandle("_03_HMI.Rivet1ingOK_SpeedJudgment");
                iHandle_HMI.iHandleRivet1ingOK_PositionVariationJudgment = tcAdsClient.CreateVariableHandle("_03_HMI.Rivet1ingOK_PositionVariationJudgment");
                iHandle_HMI.iHandleRivet1ingOK_TorqueJudgment = tcAdsClient.CreateVariableHandle("_03_HMI.Rivet1ingOK_TorqueJudgment");
                iHandle_HMI.iHandleRivet1ingOK_PositionJudgment = tcAdsClient.CreateVariableHandle("_03_HMI.Rivet1ingOK_PositionJudgment");
                iHandle_HMI.iHandleRivet1ingNOK_OverTime = tcAdsClient.CreateVariableHandle("_03_HMI.Rivet1ingNOK_OverTime");
                iHandle_HMI.iHandleRivet1ingNOK_OverSpeed = tcAdsClient.CreateVariableHandle("_03_HMI.Rivet1ingNOK_OverSpeed");
                iHandle_HMI.iHandleRivet1ingNOK_OverPosition = tcAdsClient.CreateVariableHandle("_03_HMI.Rivet1ingNOK_OverPosition");
                iHandle_HMI.iHandleRivet1ingTime = tcAdsClient.CreateVariableHandle("_03_HMI.Rivet1ingTime");
                iHandle_HMI.iHandleRivet1OKPositionRecord = tcAdsClient.CreateVariableHandle("_03_HMI.Rivet1OKPositionRecord");
                iHandle_HMI.iHandleRivet1Force = tcAdsClient.CreateVariableHandle("_03_HMI.Rivet1Force");
                iHandle_HMI.iHandleRivet1ForceP = tcAdsClient.CreateVariableHandle("_03_HMI.Rivet1ForceP");
                iHandle_HMI.iHandleRivet1ForceI = tcAdsClient.CreateVariableHandle("_03_HMI.Rivet1ForceI");
                iHandle_HMI.iHandleRivet1RotationalSpeed = tcAdsClient.CreateVariableHandle("_03_HMI.Rivet1RotationalSpeed");
                iHandle_HMI.iHandleRivet1RotationalACCTime = tcAdsClient.CreateVariableHandle("_03_HMI.Rivet1RotationalACCTime");
                iHandle_HMI.iHandleRivet1RotationalDECTime = tcAdsClient.CreateVariableHandle("_03_HMI.Rivet1RotationalDECTime");
                iHandle_HMI.iHandleRivet1OKUpPosition = tcAdsClient.CreateVariableHandle("_03_HMI.Rivet1OKUpPosition");
                iHandle_HMI.iHandleRivet1OKDownPosition = tcAdsClient.CreateVariableHandle("_03_HMI.Rivet1OKDownPosition");
                iHandle_HMI.iHandleRivet1OKSpeedJudgment = tcAdsClient.CreateVariableHandle("_03_HMI.Rivet1OKSpeedJudgment");
                iHandle_HMI.iHandleRivet1OKSpeed = tcAdsClient.CreateVariableHandle("_03_HMI.Rivet1OKSpeed");
                iHandle_HMI.iHandleRivet1OKPositionVariationJudgment = tcAdsClient.CreateVariableHandle("_03_HMI.Rivet1OKPositionVariationJudgment");
                iHandle_HMI.iHandleRivet1OKPositionVariation = tcAdsClient.CreateVariableHandle("_03_HMI.Rivet1OKPositionVariation");
                iHandle_HMI.iHandleRivet1OKPositionVariationSamplintTime = tcAdsClient.CreateVariableHandle("_03_HMI.Rivet1OKPositionVariationSamplintTime");
                iHandle_HMI.iHandleRivet1OKTorqueJudgment = tcAdsClient.CreateVariableHandle("_03_HMI.Rivet1OKTorqueJudgment");
                iHandle_HMI.iHandleRivet1OKTorque = tcAdsClient.CreateVariableHandle("_03_HMI.Rivet1OKTorque");
                iHandle_HMI.iHandleRivet1OKPositionJudgment = tcAdsClient.CreateVariableHandle("_03_HMI.Rivet1OKPositionJudgment");
                iHandle_HMI.iHandleRivet1OKPosition = tcAdsClient.CreateVariableHandle("_03_HMI.Rivet1OKPosition");
                iHandle_HMI.iHandleRivet1MaxSpeed = tcAdsClient.CreateVariableHandle("_03_HMI.Rivet1MaxSpeed");
                iHandle_HMI.iHandleRivet1OverTime = tcAdsClient.CreateVariableHandle("_03_HMI.Rivet1OverTime");
                iHandle_HMI.iHandleRivet2ing = tcAdsClient.CreateVariableHandle("_03_HMI.Rivet2ing");
                iHandle_HMI.iHandleRivet2ingStop = tcAdsClient.CreateVariableHandle("_03_HMI.Rivet2ingStop");
                iHandle_HMI.iHandleRivet2ingOK = tcAdsClient.CreateVariableHandle("_03_HMI.Rivet2ingOK");
                iHandle_HMI.iHandleRivet2ingNOK = tcAdsClient.CreateVariableHandle("_03_HMI.Rivet2ingNOK");
                iHandle_HMI.iHandleRivet2ingOK_SpeedJudgment = tcAdsClient.CreateVariableHandle("_03_HMI.Rivet2ingOK_SpeedJudgment");
                iHandle_HMI.iHandleRivet2ingOK_PositionVariationJudgment = tcAdsClient.CreateVariableHandle("_03_HMI.Rivet2ingOK_PositionVariationJudgment");
                iHandle_HMI.iHandleRivet2ingOK_TorqueJudgment = tcAdsClient.CreateVariableHandle("_03_HMI.Rivet2ingOK_TorqueJudgment");
                iHandle_HMI.iHandleRivet2ingOK_PositionJudgment = tcAdsClient.CreateVariableHandle("_03_HMI.Rivet2ingOK_PositionJudgment");
                iHandle_HMI.iHandleRivet2ingNOK_OverTime = tcAdsClient.CreateVariableHandle("_03_HMI.Rivet2ingNOK_OverTime");
                iHandle_HMI.iHandleRivet2ingNOK_OverSpeed = tcAdsClient.CreateVariableHandle("_03_HMI.Rivet2ingNOK_OverSpeed");
                iHandle_HMI.iHandleRivet2ingNOK_OverPosition = tcAdsClient.CreateVariableHandle("_03_HMI.Rivet2ingNOK_OverPosition");
                iHandle_HMI.iHandleRivet2ingTime = tcAdsClient.CreateVariableHandle("_03_HMI.Rivet2ingTime");
                iHandle_HMI.iHandleRivet2OKPositionRecord = tcAdsClient.CreateVariableHandle("_03_HMI.Rivet2OKPositionRecord");
                iHandle_HMI.iHandleRivet2Force = tcAdsClient.CreateVariableHandle("_03_HMI.Rivet2Force");
                iHandle_HMI.iHandleRivet2ForceP = tcAdsClient.CreateVariableHandle("_03_HMI.Rivet2ForceP");
                iHandle_HMI.iHandleRivet2ForceI = tcAdsClient.CreateVariableHandle("_03_HMI.Rivet2ForceI");
                iHandle_HMI.iHandleRivet2RotationalSpeed = tcAdsClient.CreateVariableHandle("_03_HMI.Rivet2RotationalSpeed");
                iHandle_HMI.iHandleRivet2RotationalACCTime = tcAdsClient.CreateVariableHandle("_03_HMI.Rivet2RotationalACCTime");
                iHandle_HMI.iHandleRivet2RotationalDECTime = tcAdsClient.CreateVariableHandle("_03_HMI.Rivet2RotationalDECTime");
                iHandle_HMI.iHandleRivet2OKUpPosition = tcAdsClient.CreateVariableHandle("_03_HMI.Rivet2OKUpPosition");
                iHandle_HMI.iHandleRivet2OKDownPosition = tcAdsClient.CreateVariableHandle("_03_HMI.Rivet2OKDownPosition");
                iHandle_HMI.iHandleRivet2OKSpeedJudgment = tcAdsClient.CreateVariableHandle("_03_HMI.Rivet2OKSpeedJudgment");
                iHandle_HMI.iHandleRivet2OKSpeed = tcAdsClient.CreateVariableHandle("_03_HMI.Rivet2OKSpeed");
                iHandle_HMI.iHandleRivet2OKPositionVariationJudgment = tcAdsClient.CreateVariableHandle("_03_HMI.Rivet2OKPositionVariationJudgment");
                iHandle_HMI.iHandleRivet2OKPositionVariation = tcAdsClient.CreateVariableHandle("_03_HMI.Rivet2OKPositionVariation");
                iHandle_HMI.iHandleRivet2OKPositionVariationSamplintTime = tcAdsClient.CreateVariableHandle("_03_HMI.Rivet2OKPositionVariationSamplintTime");
                iHandle_HMI.iHandleRivet2OKTorqueJudgment = tcAdsClient.CreateVariableHandle("_03_HMI.Rivet2OKTorqueJudgment");
                iHandle_HMI.iHandleRivet2OKTorque = tcAdsClient.CreateVariableHandle("_03_HMI.Rivet2OKTorque");
                iHandle_HMI.iHandleRivet2OKPositionJudgment = tcAdsClient.CreateVariableHandle("_03_HMI.Rivet2OKPositionJudgment");
                iHandle_HMI.iHandleRivet2OKPosition = tcAdsClient.CreateVariableHandle("_03_HMI.Rivet2OKPosition");
                iHandle_HMI.iHandleRivet2MaxSpeed = tcAdsClient.CreateVariableHandle("_03_HMI.Rivet2MaxSpeed");
                iHandle_HMI.iHandleRivet2OverTime = tcAdsClient.CreateVariableHandle("_03_HMI.Rivet2OverTime");
                iHandle_HMI.iHandleRivet3ing = tcAdsClient.CreateVariableHandle("_03_HMI.Rivet3ing");
                iHandle_HMI.iHandleRivet3ingStop = tcAdsClient.CreateVariableHandle("_03_HMI.Rivet3ingStop");
                iHandle_HMI.iHandleRivet3ingOK = tcAdsClient.CreateVariableHandle("_03_HMI.Rivet3ingOK");
                iHandle_HMI.iHandleRivet3ingNOK = tcAdsClient.CreateVariableHandle("_03_HMI.Rivet3ingNOK");
                iHandle_HMI.iHandleRivet3ingOK_SpeedJudgment = tcAdsClient.CreateVariableHandle("_03_HMI.Rivet3ingOK_SpeedJudgment");
                iHandle_HMI.iHandleRivet3ingOK_PositionVariationJudgment = tcAdsClient.CreateVariableHandle("_03_HMI.Rivet3ingOK_PositionVariationJudgment");
                iHandle_HMI.iHandleRivet3ingOK_TorqueJudgment = tcAdsClient.CreateVariableHandle("_03_HMI.Rivet3ingOK_TorqueJudgment");
                iHandle_HMI.iHandleRivet3ingOK_PositionJudgment = tcAdsClient.CreateVariableHandle("_03_HMI.Rivet3ingOK_PositionJudgment");
                iHandle_HMI.iHandleRivet3ingNOK_OverTime = tcAdsClient.CreateVariableHandle("_03_HMI.Rivet3ingNOK_OverTime");
                iHandle_HMI.iHandleRivet3ingNOK_OverSpeed = tcAdsClient.CreateVariableHandle("_03_HMI.Rivet3ingNOK_OverSpeed");
                iHandle_HMI.iHandleRivet3ingNOK_OverPosition = tcAdsClient.CreateVariableHandle("_03_HMI.Rivet3ingNOK_OverPosition");
                iHandle_HMI.iHandleRivet3ingTime = tcAdsClient.CreateVariableHandle("_03_HMI.Rivet3ingTime");
                iHandle_HMI.iHandleRivet3OKPositionRecord = tcAdsClient.CreateVariableHandle("_03_HMI.Rivet3OKPositionRecord");
                iHandle_HMI.iHandleRivet3Force = tcAdsClient.CreateVariableHandle("_03_HMI.Rivet3Force");
                iHandle_HMI.iHandleRivet3ForceP = tcAdsClient.CreateVariableHandle("_03_HMI.Rivet3ForceP");
                iHandle_HMI.iHandleRivet3ForceI = tcAdsClient.CreateVariableHandle("_03_HMI.Rivet3ForceI");
                iHandle_HMI.iHandleRivet3RotationalSpeed = tcAdsClient.CreateVariableHandle("_03_HMI.Rivet3RotationalSpeed");
                iHandle_HMI.iHandleRivet3RotationalACCTime = tcAdsClient.CreateVariableHandle("_03_HMI.Rivet3RotationalACCTime");
                iHandle_HMI.iHandleRivet3RotationalDECTime = tcAdsClient.CreateVariableHandle("_03_HMI.Rivet3RotationalDECTime");
                iHandle_HMI.iHandleRivet3OKUpPosition = tcAdsClient.CreateVariableHandle("_03_HMI.Rivet3OKUpPosition");
                iHandle_HMI.iHandleRivet3OKDownPosition = tcAdsClient.CreateVariableHandle("_03_HMI.Rivet3OKDownPosition");
                iHandle_HMI.iHandleRivet3OKSpeedJudgment = tcAdsClient.CreateVariableHandle("_03_HMI.Rivet3OKSpeedJudgment");
                iHandle_HMI.iHandleRivet3OKSpeed = tcAdsClient.CreateVariableHandle("_03_HMI.Rivet3OKSpeed");
                iHandle_HMI.iHandleRivet3OKPositionVariationJudgment = tcAdsClient.CreateVariableHandle("_03_HMI.Rivet3OKPositionVariationJudgment");
                iHandle_HMI.iHandleRivet3OKPositionVariation = tcAdsClient.CreateVariableHandle("_03_HMI.Rivet3OKPositionVariation");
                iHandle_HMI.iHandleRivet3OKPositionVariationSamplintTime = tcAdsClient.CreateVariableHandle("_03_HMI.Rivet3OKPositionVariationSamplintTime");
                iHandle_HMI.iHandleRivet3OKTorqueJudgment = tcAdsClient.CreateVariableHandle("_03_HMI.Rivet3OKTorqueJudgment");
                iHandle_HMI.iHandleRivet3OKTorque = tcAdsClient.CreateVariableHandle("_03_HMI.Rivet3OKTorque");
                iHandle_HMI.iHandleRivet3OKPositionJudgment = tcAdsClient.CreateVariableHandle("_03_HMI.Rivet3OKPositionJudgment");
                iHandle_HMI.iHandleRivet3OKPosition = tcAdsClient.CreateVariableHandle("_03_HMI.Rivet3OKPosition");
                iHandle_HMI.iHandleRivet3MaxSpeed = tcAdsClient.CreateVariableHandle("_03_HMI.Rivet3MaxSpeed");
                iHandle_HMI.iHandleRivet3OverTime = tcAdsClient.CreateVariableHandle("_03_HMI.Rivet3OverTime");




                iHandle_HMI.iHandleMEmgStop = tcAdsClient.CreateVariableHandle("Main_Sys.MEmgStop");
                iHandle_HMI.iHandleExc_EmgStop = tcAdsClient.CreateVariableHandle("Main_Sys.Exc_EmgStop");
                iHandle_HMI.iHandlebiSwEmgStop = tcAdsClient.CreateVariableHandle("_02_InOutput.biSwEmgStop");
                iHandle_HMI.iHandlebiEbEmgStop = tcAdsClient.CreateVariableHandle("_02_InOutput.biEbEmgStop");
                iHandle_HMI.iHandlebiContactor1 = tcAdsClient.CreateVariableHandle("_02_InOutput.biContactor1");
                iHandle_HMI.iHandlebiContactor2 = tcAdsClient.CreateVariableHandle("_02_InOutput.biContactor2");
                iHandle_HMI.iHandlebiAxis1Ready = tcAdsClient.CreateVariableHandle("_02_InOutput.biAxis1Ready");
                iHandle_HMI.iHandlebiAxis2Ready = tcAdsClient.CreateVariableHandle("_02_InOutput.biAxis2Ready");
                iHandle_HMI.iHandlebiBtRun = tcAdsClient.CreateVariableHandle("_02_InOutput.biBtRun");
                iHandle_HMI.iHandlebiBtReset = tcAdsClient.CreateVariableHandle("_02_InOutput.biBtReset");
                iHandle_HMI.iHandlebiTotaInAirPresRch1 = tcAdsClient.CreateVariableHandle("_02_InOutput.biTotaInAirPresRch1");
                iHandle_HMI.iHandlebiTotaInAirPresRch2 = tcAdsClient.CreateVariableHandle("_02_InOutput.biTotaInAirPresRch2");


                iHandle_HMI.iHandleRefFeedMachPushRivetValve = tcAdsClient.CreateVariableHandle("_03_HMI.RefFeedMachPushRivetValve");
                iHandle_HMI.iHandleRefFeedMachBlowRivetValve = tcAdsClient.CreateVariableHandle("_03_HMI.RefFeedMachBlowRivetValve");
                iHandle_HMI.iHandleRefClampValve = tcAdsClient.CreateVariableHandle("_03_HMI.RefClampValve");
                iHandle_HMI.iHandleRefCachePlacePushRivetValve = tcAdsClient.CreateVariableHandle("_03_HMI.RefCachePlacePushRivetValve");
                iHandle_HMI.iHandleRefCachePlaceBlowRivetValve = tcAdsClient.CreateVariableHandle("_03_HMI.RefCachePlaceBlowRivetValve");
                iHandle_HMI.iHandleRefEnableVacuoValve = tcAdsClient.CreateVariableHandle("_03_HMI.RefEnableVacuoValve");
                iHandle_HMI.iHandleRefDisableVacuoValve = tcAdsClient.CreateVariableHandle("_03_HMI.RefDisableVacuoValve");
                iHandle_HMI.iHandleRefGunHeadBlowRivetValve = tcAdsClient.CreateVariableHandle("_03_HMI.RefGunHeadBlowRivetValve");
                iHandle_HMI.iHandleRefPrePressureExtendValve = tcAdsClient.CreateVariableHandle("_03_HMI.RefPrePressureExtendValve");
                iHandle_HMI.iHandleRefPrePressureRetractValve = tcAdsClient.CreateVariableHandle("_03_HMI.RefPrePressureRetractValve");




                iHandle_HMI.iHandlebiVacuoValueRch1 = tcAdsClient.CreateVariableHandle("_02_InOutput.biVacuoValueRch1");
                iHandle_HMI.iHandlebtManualInhaleRivet = tcAdsClient.CreateVariableHandle("_03_HMI.btManualInhaleRivet");
                iHandle_HMI.iHandleRefVacuoValve_Manual = tcAdsClient.CreateVariableHandle("_03_HMI.RefVacuoValve_Manual");
                iHandle_HMI.iHandlebtManualFeed = tcAdsClient.CreateVariableHandle("_03_HMI.btManualFeed");
                iHandle_HMI.iHandlebtManualPrePress = tcAdsClient.CreateVariableHandle("_03_HMI.btManualPrePress");

                iHandle_HMI.iHandlebtManualRivet = tcAdsClient.CreateVariableHandle("_03_HMI.btManualRivet");









                CommOK = true;
                return true;
            }
            catch (Exception)
            {
                CommOK = false;
                return false;
            }
        }
        #endregion

        #region 读结构体，将结构体数据存入字典集合


        public static void ReadTechnicsNumber()
        {
            try
            { 
                int[] tmparr = (int[])tcAdsClient.ReadAny(iHandleTechnicsNumber, typeof(int[]), new int[] { 1 });
                TechnicsNumber = tmparr[0]; 
                CommonMethods.CurrentValue["TechnicsNumber"] = TechnicsNumber.ToString(); 
            }
            catch (Exception ex)
            { 
            }


        }
        public static void ReadHMI03()
        {

            HMI_Var.SysIsReady = (bool)tcAdsClient.ReadAny(iHandle_HMI.iHandleSysIsReady, typeof(bool));
            HMI_Var.SysAlarmActive = (bool)tcAdsClient.ReadAny(iHandle_HMI.iHandleSysAlarmActive, typeof(bool));
            HMI_Var.SysNotEmgStop = (bool)tcAdsClient.ReadAny(iHandle_HMI.iHandleSysNotEmgStop, typeof(bool));
            HMI_Var.ErrDoorOpen = (bool)tcAdsClient.ReadAny(iHandle_HMI.iHandleErrDoorOpen, typeof(bool));
            HMI_Var.SysManualMode = (bool)tcAdsClient.ReadAny(iHandle_HMI.iHandleSysManualMode, typeof(bool));
            HMI_Var.SysAutoMode = (bool)tcAdsClient.ReadAny(iHandle_HMI.iHandleSysAutoMode, typeof(bool));
            HMI_Var.SysExcMode = (bool)tcAdsClient.ReadAny(iHandle_HMI.iHandleSysExcMode, typeof(bool));
            HMI_Var.SysDebugMode = (bool)tcAdsClient.ReadAny(iHandle_HMI.iHandleSysDebugMode, typeof(bool));
            HMI_Var.SysStep = (ushort)tcAdsClient.ReadAny(iHandle_HMI.iHandleSysStep, typeof(ushort));
            HMI_Var.ManualStep = (ushort)tcAdsClient.ReadAny(iHandle_HMI.iHandleManualStep, typeof(ushort));
            HMI_Var.AutoStep = (ushort)tcAdsClient.ReadAny(iHandle_HMI.iHandleAutoStep, typeof(ushort));
            HMI_Var.ExcStep = (ushort)tcAdsClient.ReadAny(iHandle_HMI.iHandleExcStep, typeof(ushort));
            HMI_Var.DebugStep = (ushort)tcAdsClient.ReadAny(iHandle_HMI.iHandleDebugStep, typeof(ushort));
            HMI_Var.DataPressure = (float)tcAdsClient.ReadAny(iHandle_HMI.iHandleDataPressure, typeof(float));
            HMI_Var.DataTorque = (float)tcAdsClient.ReadAny(iHandle_HMI.iHandleDataTorque, typeof(float));
            HMI_Var.ActVelo2 = (float)tcAdsClient.ReadAny(iHandle_HMI.iHandleActVelo2, typeof(float));
            HMI_Var.ActVelo1 = (float)tcAdsClient.ReadAny(iHandle_HMI.iHandleActVelo1, typeof(float));
            HMI_Var.ActPos2 = (float)tcAdsClient.ReadAny(iHandle_HMI.iHandleActPos2, typeof(float));
            HMI_Var.MaxPressure = (float)tcAdsClient.ReadAny(iHandle_HMI.iHandleMaxPressure, typeof(float));
            HMI_Var.MaxTorque = (float)tcAdsClient.ReadAny(iHandle_HMI.iHandleMaxTorque, typeof(float));
            HMI_Var.Timer = (ushort)tcAdsClient.ReadAny(iHandle_HMI.iHandleTimer, typeof(ushort));
            HMI_Var.status1 = (bool)tcAdsClient.ReadAny(iHandle_HMI.iHandlestatus1, typeof(bool));
            HMI_Var.status2 = (bool)tcAdsClient.ReadAny(iHandle_HMI.iHandlestatus2, typeof(bool));
            HMI_Var.status3 = (bool)tcAdsClient.ReadAny(iHandle_HMI.iHandlestatus3, typeof(bool));
            HMI_Var.status4 = (bool)tcAdsClient.ReadAny(iHandle_HMI.iHandlestatus4, typeof(bool));
            HMI_Var.status5 = (bool)tcAdsClient.ReadAny(iHandle_HMI.iHandlestatus5, typeof(bool));
            HMI_Var.status6 = (bool)tcAdsClient.ReadAny(iHandle_HMI.iHandlestatus6, typeof(bool));
            HMI_Var.status7 = (bool)tcAdsClient.ReadAny(iHandle_HMI.iHandlestatus7, typeof(bool));
            HMI_Var.status8 = (bool)tcAdsClient.ReadAny(iHandle_HMI.iHandlestatus8, typeof(bool));
            HMI_Var.btDebug = (bool)tcAdsClient.ReadAny(iHandle_HMI.iHandlebtDebug, typeof(bool));
            HMI_Var.btMotorDebug = (bool)tcAdsClient.ReadAny(iHandle_HMI.iHandlebtMotorDebug, typeof(bool));
            HMI_Var.btFeedTest = (bool)tcAdsClient.ReadAny(iHandle_HMI.iHandlebtFeedTest, typeof(bool));
            HMI_Var.Enabled1 = (bool)tcAdsClient.ReadAny(iHandle_HMI.iHandleEnabled1, typeof(bool));
            HMI_Var.Error1 = (bool)tcAdsClient.ReadAny(iHandle_HMI.iHandleError1, typeof(bool));
            HMI_Var.JogVelocity1 = (float)tcAdsClient.ReadAny(iHandle_HMI.iHandleJogVelocity1, typeof(float));
            HMI_Var.btManualJogF1 = (bool)tcAdsClient.ReadAny(iHandle_HMI.iHandlebtManualJogF1, typeof(bool));
            HMI_Var.btManualJogB1 = (bool)tcAdsClient.ReadAny(iHandle_HMI.iHandlebtManualJogB1, typeof(bool));
            HMI_Var.btManualPower1 = (bool)tcAdsClient.ReadAny(iHandle_HMI.iHandlebtManualPower1, typeof(bool));
            HMI_Var.btReset1 = (bool)tcAdsClient.ReadAny(iHandle_HMI.iHandlebtReset1, typeof(bool));
            HMI_Var.Enabled2 = (bool)tcAdsClient.ReadAny(iHandle_HMI.iHandleEnabled2, typeof(bool));
            HMI_Var.Error2 = (bool)tcAdsClient.ReadAny(iHandle_HMI.iHandleError2, typeof(bool));
            HMI_Var.MotorDebug_Axis2SetVelo = (float)tcAdsClient.ReadAny(iHandle_HMI.iHandleMotorDebug_Axis2SetVelo, typeof(float));
            HMI_Var.MotorDebug_Axis2SetPos = (float)tcAdsClient.ReadAny(iHandle_HMI.iHandleMotorDebug_Axis2SetPos, typeof(float));
            HMI_Var.MotorDebug_Axis2SwitchForce = (float)tcAdsClient.ReadAny(iHandle_HMI.iHandleMotorDebug_Axis2SwitchForce, typeof(float));
            HMI_Var.MotorDebug_Axis2SetForce = (float)tcAdsClient.ReadAny(iHandle_HMI.iHandleMotorDebug_Axis2SetForce, typeof(float));
            HMI_Var.MotorDebug_Axis2ForcePosLimit = (float)tcAdsClient.ReadAny(iHandle_HMI.iHandleMotorDebug_Axis2ForcePosLimit, typeof(float));
            HMI_Var.MotorDebug_Axis2JOGMinus = (bool)tcAdsClient.ReadAny(iHandle_HMI.iHandleMotorDebug_Axis2JOGMinus, typeof(bool));
            HMI_Var.MotorDebug_Axis2JOGPlus = (bool)tcAdsClient.ReadAny(iHandle_HMI.iHandleMotorDebug_Axis2JOGPlus, typeof(bool));
            HMI_Var.MotorDebug_Axis2HOME = (bool)tcAdsClient.ReadAny(iHandle_HMI.iHandleMotorDebug_Axis2HOME, typeof(bool));
            HMI_Var.MotorDebug_Axis2PoStart = (bool)tcAdsClient.ReadAny(iHandle_HMI.iHandleMotorDebug_Axis2PoStart, typeof(bool));
            HMI_Var.MotorDebug_Axis2ForceStart = (bool)tcAdsClient.ReadAny(iHandle_HMI.iHandleMotorDebug_Axis2ForceStart, typeof(bool));
            HMI_Var.MotorDebug_Axis2STOP = (bool)tcAdsClient.ReadAny(iHandle_HMI.iHandleMotorDebug_Axis2STOP, typeof(bool));
            HMI_Var.MotorDebug_Axis2Reset = (bool)tcAdsClient.ReadAny(iHandle_HMI.iHandleMotorDebug_Axis2Reset, typeof(bool));
            HMI_Var.Feeding = (bool)tcAdsClient.ReadAny(iHandle_HMI.iHandleFeeding, typeof(bool));
            HMI_Var.FeedingStop = (bool)tcAdsClient.ReadAny(iHandle_HMI.iHandleFeedingStop, typeof(bool));
            HMI_Var.FeedingOK = (bool)tcAdsClient.ReadAny(iHandle_HMI.iHandleFeedingOK, typeof(bool));
            HMI_Var.FeedingNOK = (bool)tcAdsClient.ReadAny(iHandle_HMI.iHandleFeedingNOK, typeof(bool));
            HMI_Var.FeedingTime = (ushort)tcAdsClient.ReadAny(iHandle_HMI.iHandleFeedingTime, typeof(ushort));
            HMI_Var.MaxFeedingTime = (ushort)tcAdsClient.ReadAny(iHandle_HMI.iHandleMaxFeedingTime, typeof(ushort));
            HMI_Var.btFeed = (bool)tcAdsClient.ReadAny(iHandle_HMI.iHandlebtFeed, typeof(bool));
            HMI_Var.btFeedingTestStart_Stop = (bool)tcAdsClient.ReadAny(iHandle_HMI.iHandlebtFeedingTestStart_Stop, typeof(bool));
            HMI_Var.btDay_Night = (bool)tcAdsClient.ReadAny(iHandle_HMI.iHandlebtDay_Night, typeof(bool));
            HMI_Var.FeedMachModel = (UInt32)tcAdsClient.ReadAny(iHandle_HMI.iHandleFeedMachModel, typeof(UInt32));
            HMI_Var.btFeedMachPushRivetValve = (bool)tcAdsClient.ReadAny(iHandle_HMI.iHandlebtFeedMachPushRivetValve, typeof(bool));
            HMI_Var.btFeedMachBlowRivetValve = (bool)tcAdsClient.ReadAny(iHandle_HMI.iHandlebtFeedMachBlowRivetValve, typeof(bool));
            HMI_Var.FeedMachRivetOK = (bool)tcAdsClient.ReadAny(iHandle_HMI.iHandleFeedMachRivetOK, typeof(bool));
            HMI_Var.FeedMachPushRivetBasic = (bool)tcAdsClient.ReadAny(iHandle_HMI.iHandleFeedMachPushRivetBasic, typeof(bool));
            HMI_Var.FeedMachPushRivetWork = (bool)tcAdsClient.ReadAny(iHandle_HMI.iHandleFeedMachPushRivetWork, typeof(bool));
            HMI_Var.FeedMachRivetOut = (bool)tcAdsClient.ReadAny(iHandle_HMI.iHandleFeedMachRivetOut, typeof(bool));
            HMI_Var.FeedMachLastCycleCounter = (UInt32)tcAdsClient.ReadAny(iHandle_HMI.iHandleFeedMachLastCycleCounter, typeof(UInt32));
            HMI_Var.FeedMachNowCycleCounter = (UInt32)tcAdsClient.ReadAny(iHandle_HMI.iHandleFeedMachNowCycleCounter, typeof(UInt32));
            HMI_Var.FeedMachRivetOutCounter = (UInt32)tcAdsClient.ReadAny(iHandle_HMI.iHandleFeedMachRivetOutCounter, typeof(UInt32));
            HMI_Var.btFeedMachLastCycleCounterClean = (bool)tcAdsClient.ReadAny(iHandle_HMI.iHandlebtFeedMachLastCycleCounterClean, typeof(bool));
            HMI_Var.btFeedMachNowCycleCounterClean = (bool)tcAdsClient.ReadAny(iHandle_HMI.iHandlebtFeedMachNowCycleCounterClean, typeof(bool));
            HMI_Var.btFeedMachRivetOutCounterClean = (bool)tcAdsClient.ReadAny(iHandle_HMI.iHandlebtFeedMachRivetOutCounterClean, typeof(bool));
            HMI_Var.FeedMachNowCycleing = (bool)tcAdsClient.ReadAny(iHandle_HMI.iHandleFeedMachNowCycleing, typeof(bool));
            HMI_Var.FeedMachBlowRivetOverTimeAlarm = (bool)tcAdsClient.ReadAny(iHandle_HMI.iHandleFeedMachBlowRivetOverTimeAlarm, typeof(bool));
            HMI_Var.FeedMachBlowRivetOverTimeReset = (bool)tcAdsClient.ReadAny(iHandle_HMI.iHandleFeedMachBlowRivetOverTimeReset, typeof(bool));
            HMI_Var.FeedMachRivetOutOverTimeAlarm = (bool)tcAdsClient.ReadAny(iHandle_HMI.iHandleFeedMachRivetOutOverTimeAlarm, typeof(bool));
            HMI_Var.FeedMachRivetOutOverTimeReset = (bool)tcAdsClient.ReadAny(iHandle_HMI.iHandleFeedMachRivetOutOverTimeReset, typeof(bool));
            HMI_Var.FeedMachRivetOutOverTime = (ushort)tcAdsClient.ReadAny(iHandle_HMI.iHandleFeedMachRivetOutOverTime, typeof(ushort));
            HMI_Var.btClampValve = (bool)tcAdsClient.ReadAny(iHandle_HMI.iHandlebtClampValve, typeof(bool));
            HMI_Var.btCachePlacePushRivetValve = (bool)tcAdsClient.ReadAny(iHandle_HMI.iHandlebtCachePlacePushRivetValve, typeof(bool));
            HMI_Var.btCachePlaceBlowRivetValve = (bool)tcAdsClient.ReadAny(iHandle_HMI.iHandlebtCachePlaceBlowRivetValve, typeof(bool));
            HMI_Var.btEnableVacuoValve = (bool)tcAdsClient.ReadAny(iHandle_HMI.iHandlebtEnableVacuoValve, typeof(bool));
            HMI_Var.btDisableVacuoValve = (bool)tcAdsClient.ReadAny(iHandle_HMI.iHandlebtDisableVacuoValve, typeof(bool));
            HMI_Var.btGunHeadBlowRivetValve = (bool)tcAdsClient.ReadAny(iHandle_HMI.iHandlebtGunHeadBlowRivetValve, typeof(bool));
            HMI_Var.btPrePressureExtendValve = (bool)tcAdsClient.ReadAny(iHandle_HMI.iHandlebtPrePressureExtendValve, typeof(bool));
            HMI_Var.btPrePressureRetractValve = (bool)tcAdsClient.ReadAny(iHandle_HMI.iHandlebtPrePressureRetractValve, typeof(bool));
            HMI_Var.CachePlaceRivetIn = (bool)tcAdsClient.ReadAny(iHandle_HMI.iHandleCachePlaceRivetIn, typeof(bool));
            HMI_Var.CachePlaceRivetOut = (bool)tcAdsClient.ReadAny(iHandle_HMI.iHandleCachePlaceRivetOut, typeof(bool));
            HMI_Var.GunHeadRivetIn = (bool)tcAdsClient.ReadAny(iHandle_HMI.iHandleGunHeadRivetIn, typeof(bool));
            HMI_Var.CachePlaceRivetAt = (bool)tcAdsClient.ReadAny(iHandle_HMI.iHandleCachePlaceRivetAt, typeof(bool));
            HMI_Var.ClampWork = (bool)tcAdsClient.ReadAny(iHandle_HMI.iHandleClampWork, typeof(bool));
            HMI_Var.ClampBasic = (bool)tcAdsClient.ReadAny(iHandle_HMI.iHandleClampBasic, typeof(bool));
            HMI_Var.CachePlacePushRivetWork = (bool)tcAdsClient.ReadAny(iHandle_HMI.iHandleCachePlacePushRivetWork, typeof(bool));
            HMI_Var.CachePlacePushRivetBasic = (bool)tcAdsClient.ReadAny(iHandle_HMI.iHandleCachePlacePushRivetBasic, typeof(bool));
            HMI_Var.PrePressureWork1 = (bool)tcAdsClient.ReadAny(iHandle_HMI.iHandlePrePressureWork1, typeof(bool));
            HMI_Var.PrePressureBasic1 = (bool)tcAdsClient.ReadAny(iHandle_HMI.iHandlePrePressureBasic1, typeof(bool));
            HMI_Var.PrePressureWork2 = (bool)tcAdsClient.ReadAny(iHandle_HMI.iHandlePrePressureWork2, typeof(bool));
            HMI_Var.PrePressureBasic2 = (bool)tcAdsClient.ReadAny(iHandle_HMI.iHandlePrePressureBasic2, typeof(bool));
            HMI_Var.VacuoValueRch1 = (bool)tcAdsClient.ReadAny(iHandle_HMI.iHandleVacuoValueRch1, typeof(bool));
            HMI_Var.LimitSwitchUp = (bool)tcAdsClient.ReadAny(iHandle_HMI.iHandleLimitSwitchUp, typeof(bool));
            HMI_Var.LimitSwitchOrigin = (bool)tcAdsClient.ReadAny(iHandle_HMI.iHandleLimitSwitchOrigin, typeof(bool));
            HMI_Var.LimitSwitchDown = (bool)tcAdsClient.ReadAny(iHandle_HMI.iHandleLimitSwitchDown, typeof(bool));
            HMI_Var.GunLastCycleCounter = (UInt32)tcAdsClient.ReadAny(iHandle_HMI.iHandleGunLastCycleCounter, typeof(UInt32));
            HMI_Var.GunNowCycleCounter = (UInt32)tcAdsClient.ReadAny(iHandle_HMI.iHandleGunNowCycleCounter, typeof(UInt32));
            HMI_Var.CachePlaceRivetInCounter = (UInt32)tcAdsClient.ReadAny(iHandle_HMI.iHandleCachePlaceRivetInCounter, typeof(UInt32));
            HMI_Var.RivetInCounter = (UInt32)tcAdsClient.ReadAny(iHandle_HMI.iHandleRivetInCounter, typeof(UInt32));
            HMI_Var.RivetOutCounter = (UInt32)tcAdsClient.ReadAny(iHandle_HMI.iHandleRivetOutCounter, typeof(UInt32));
            HMI_Var.InhaleRivetOKCounter = (UInt32)tcAdsClient.ReadAny(iHandle_HMI.iHandleInhaleRivetOKCounter, typeof(UInt32));
            HMI_Var.InhaleRivetNOKCounter = (UInt32)tcAdsClient.ReadAny(iHandle_HMI.iHandleInhaleRivetNOKCounter, typeof(UInt32));
            HMI_Var.btCounterClear = (bool)tcAdsClient.ReadAny(iHandle_HMI.iHandlebtCounterClear, typeof(bool));
            HMI_Var.btGunLastCycleCounterClean = (bool)tcAdsClient.ReadAny(iHandle_HMI.iHandlebtGunLastCycleCounterClean, typeof(bool));
            HMI_Var.btGunNowCycleCounterClean = (bool)tcAdsClient.ReadAny(iHandle_HMI.iHandlebtGunNowCycleCounterClean, typeof(bool));
            HMI_Var.btCachePlaceRivetInCounterClean = (bool)tcAdsClient.ReadAny(iHandle_HMI.iHandlebtCachePlaceRivetInCounterClean, typeof(bool));
            HMI_Var.btCachePlaceRivetOutCounterClean = (bool)tcAdsClient.ReadAny(iHandle_HMI.iHandlebtCachePlaceRivetOutCounterClean, typeof(bool));
            HMI_Var.btGunHeadRivetInCounterClean = (bool)tcAdsClient.ReadAny(iHandle_HMI.iHandlebtGunHeadRivetInCounterClean, typeof(bool));
            HMI_Var.btInhaleRivetOKCounterClean = (bool)tcAdsClient.ReadAny(iHandle_HMI.iHandlebtInhaleRivetOKCounterClean, typeof(bool));
            HMI_Var.btInhaleRivetNOKCounterClean = (bool)tcAdsClient.ReadAny(iHandle_HMI.iHandlebtInhaleRivetNOKCounterClean, typeof(bool));
            HMI_Var.btInhaleRivetActualCounterClean = (bool)tcAdsClient.ReadAny(iHandle_HMI.iHandlebtInhaleRivetActualCounterClean, typeof(bool));
            HMI_Var.GunNowCycleing = (bool)tcAdsClient.ReadAny(iHandle_HMI.iHandleGunNowCycleing, typeof(bool));
            HMI_Var.CachePlaceRivetInOverTimeAlarm = (bool)tcAdsClient.ReadAny(iHandle_HMI.iHandleCachePlaceRivetInOverTimeAlarm, typeof(bool));
            HMI_Var.CachePlaceRivetInOverTimeReset = (bool)tcAdsClient.ReadAny(iHandle_HMI.iHandleCachePlaceRivetInOverTimeReset, typeof(bool));
            HMI_Var.CachePlaceRivetAtOverTimeAlarm = (bool)tcAdsClient.ReadAny(iHandle_HMI.iHandleCachePlaceRivetAtOverTimeAlarm, typeof(bool));
            HMI_Var.CachePlaceRivetAtOverTimeReset = (bool)tcAdsClient.ReadAny(iHandle_HMI.iHandleCachePlaceRivetAtOverTimeReset, typeof(bool));
            HMI_Var.CachePlaceBlowRivetOverTimeAlarm = (bool)tcAdsClient.ReadAny(iHandle_HMI.iHandleCachePlaceBlowRivetOverTimeAlarm, typeof(bool));
            HMI_Var.CachePlaceBlowRivetOverTimeReset = (bool)tcAdsClient.ReadAny(iHandle_HMI.iHandleCachePlaceBlowRivetOverTimeReset, typeof(bool));
            HMI_Var.CachePlaceRivetOutOverTimeAlarm = (bool)tcAdsClient.ReadAny(iHandle_HMI.iHandleCachePlaceRivetOutOverTimeAlarm, typeof(bool));
            HMI_Var.CachePlaceRivetOutOverTimeReset = (bool)tcAdsClient.ReadAny(iHandle_HMI.iHandleCachePlaceRivetOutOverTimeReset, typeof(bool));
            HMI_Var.GunHeadRivetInOverTimeAlarm = (bool)tcAdsClient.ReadAny(iHandle_HMI.iHandleGunHeadRivetInOverTimeAlarm, typeof(bool));
            HMI_Var.GunHeadRivetInOverTimeReset = (bool)tcAdsClient.ReadAny(iHandle_HMI.iHandleGunHeadRivetInOverTimeReset, typeof(bool));
            HMI_Var.FeedingNOKLater_CycleContinue = (bool)tcAdsClient.ReadAny(iHandle_HMI.iHandleFeedingNOKLater_CycleContinue, typeof(bool));
            HMI_Var.InhaleRivetLater_DisableVacuoAlarm = (bool)tcAdsClient.ReadAny(iHandle_HMI.iHandleInhaleRivetLater_DisableVacuoAlarm, typeof(bool));
            HMI_Var.InhaleRivetLater_DisableVacuoReset = (bool)tcAdsClient.ReadAny(iHandle_HMI.iHandleInhaleRivetLater_DisableVacuoReset, typeof(bool));
            HMI_Var.EnableVacuoValveLater_SampleTime1 = (ushort)tcAdsClient.ReadAny(iHandle_HMI.iHandleEnableVacuoValveLater_SampleTime1, typeof(ushort));
            HMI_Var.EnableVacuoValveLater_SampleTime2 = (ushort)tcAdsClient.ReadAny(iHandle_HMI.iHandleEnableVacuoValveLater_SampleTime2, typeof(ushort));
            HMI_Var.VacuoRchLater_SampleTime = (ushort)tcAdsClient.ReadAny(iHandle_HMI.iHandleVacuoRchLater_SampleTime, typeof(ushort));
            HMI_Var.CachePlaceRivetInOverTime = (ushort)tcAdsClient.ReadAny(iHandle_HMI.iHandleCachePlaceRivetInOverTime, typeof(ushort));
            HMI_Var.CachePlaceRivetAtOverTime = (ushort)tcAdsClient.ReadAny(iHandle_HMI.iHandleCachePlaceRivetAtOverTime, typeof(ushort));
            HMI_Var.CachePlaceRivetAtHeartbeatTime = (ushort)tcAdsClient.ReadAny(iHandle_HMI.iHandleCachePlaceRivetAtHeartbeatTime, typeof(ushort));
            HMI_Var.CachePlaceRivetOutOverTime = (ushort)tcAdsClient.ReadAny(iHandle_HMI.iHandleCachePlaceRivetOutOverTime, typeof(ushort));
            HMI_Var.GunHeadRivetInOverTime = (ushort)tcAdsClient.ReadAny(iHandle_HMI.iHandleGunHeadRivetInOverTime, typeof(ushort));
            HMI_Var.GunHeadRivetIn_EnableVacuoValveDelayTime = (ushort)tcAdsClient.ReadAny(iHandle_HMI.iHandleGunHeadRivetIn_EnableVacuoValveDelayTime, typeof(ushort));
            HMI_Var.FeedTest_InhaleRivetMaxTime = (ushort)tcAdsClient.ReadAny(iHandle_HMI.iHandleFeedTest_InhaleRivetMaxTime, typeof(ushort));
            HMI_Var.FeedTest_InhaleRivetIntervalTime = (ushort)tcAdsClient.ReadAny(iHandle_HMI.iHandleFeedTest_InhaleRivetIntervalTime, typeof(ushort));
            HMI_Var.FeedTest_InhaleRivetMaxCounter = (UInt32)tcAdsClient.ReadAny(iHandle_HMI.iHandleFeedTest_InhaleRivetMaxCounter, typeof(UInt32));
            HMI_Var.PrePressureSetValue = (float)tcAdsClient.ReadAny(iHandle_HMI.iHandlePrePressureSetValue, typeof(float));
            HMI_Var.FeedPos1 = (float)tcAdsClient.ReadAny(iHandle_HMI.iHandleFeedPos1, typeof(float));
            HMI_Var.FeedTest_InhaleRivetTargetPos = (float)tcAdsClient.ReadAny(iHandle_HMI.iHandleFeedTest_InhaleRivetTargetPos, typeof(float));
            HMI_Var.FeedTest_Velo1 = (float)tcAdsClient.ReadAny(iHandle_HMI.iHandleFeedTest_Velo1, typeof(float));
            HMI_Var.FeedTest_Acc1 = (float)tcAdsClient.ReadAny(iHandle_HMI.iHandleFeedTest_Acc1, typeof(float));
            HMI_Var.FeedTest_Dec1 = (float)tcAdsClient.ReadAny(iHandle_HMI.iHandleFeedTest_Dec1, typeof(float));
            HMI_Var.FeedTest_Jerk1 = (float)tcAdsClient.ReadAny(iHandle_HMI.iHandleFeedTest_Jerk1, typeof(float));
            HMI_Var.FeedTest_Velo2 = (float)tcAdsClient.ReadAny(iHandle_HMI.iHandleFeedTest_Velo2, typeof(float));
            HMI_Var.FeedTest_Acc2 = (float)tcAdsClient.ReadAny(iHandle_HMI.iHandleFeedTest_Acc2, typeof(float));
            HMI_Var.FeedTest_Dec2 = (float)tcAdsClient.ReadAny(iHandle_HMI.iHandleFeedTest_Dec2, typeof(float));
            HMI_Var.FeedTest_Jerk2 = (float)tcAdsClient.ReadAny(iHandle_HMI.iHandleFeedTest_Jerk2, typeof(float));
            HMI_Var.EnableVacuoValveLater_VacuoValue1 = (float)tcAdsClient.ReadAny(iHandle_HMI.iHandleEnableVacuoValveLater_VacuoValue1, typeof(float));
            HMI_Var.EnableVacuoValveLater_VacuoValue2 = (float)tcAdsClient.ReadAny(iHandle_HMI.iHandleEnableVacuoValveLater_VacuoValue2, typeof(float));
            HMI_Var.SingleCycleVacuoValue = (float)tcAdsClient.ReadAny(iHandle_HMI.iHandleSingleCycleVacuoValue, typeof(float));
            HMI_Var.EnableVacuoValve_VacuoRchTime = (ushort)tcAdsClient.ReadAny(iHandle_HMI.iHandleEnableVacuoValve_VacuoRchTime, typeof(ushort));
            HMI_Var.TestFeedingTime = (ushort)tcAdsClient.ReadAny(iHandle_HMI.iHandleTestFeedingTime, typeof(ushort));
            HMI_Var.InhaleRivetActualCounter = (UInt32)tcAdsClient.ReadAny(iHandle_HMI.iHandleInhaleRivetActualCounter, typeof(UInt32));
            HMI_Var.VacuoValue1 = (float)tcAdsClient.ReadAny(iHandle_HMI.iHandleVacuoValue1, typeof(float));
            HMI_Var.PrePressureRefValue = (float)tcAdsClient.ReadAny(iHandle_HMI.iHandlePrePressureRefValue, typeof(float));
            HMI_Var.PrePressing = (bool)tcAdsClient.ReadAny(iHandle_HMI.iHandlePrePressing, typeof(bool));
            HMI_Var.PrePressingStop = (bool)tcAdsClient.ReadAny(iHandle_HMI.iHandlePrePressingStop, typeof(bool));
            HMI_Var.PrePressingOK = (bool)tcAdsClient.ReadAny(iHandle_HMI.iHandlePrePressingOK, typeof(bool));
            HMI_Var.PrePressingNOK = (bool)tcAdsClient.ReadAny(iHandle_HMI.iHandlePrePressingNOK, typeof(bool));
            HMI_Var.PrePressingNOK_OverTime = (bool)tcAdsClient.ReadAny(iHandle_HMI.iHandlePrePressingNOK_OverTime, typeof(bool));
            HMI_Var.PrePressingNOK_NOTVacuo = (bool)tcAdsClient.ReadAny(iHandle_HMI.iHandlePrePressingNOK_NOTVacuo, typeof(bool));
            HMI_Var.PrePressingNOK_OverPosition = (bool)tcAdsClient.ReadAny(iHandle_HMI.iHandlePrePressingNOK_OverPosition, typeof(bool));
            HMI_Var.PrePressingTime = (ushort)tcAdsClient.ReadAny(iHandle_HMI.iHandlePrePressingTime, typeof(ushort));
            HMI_Var.PrePressOKPositionRecord = (float)tcAdsClient.ReadAny(iHandle_HMI.iHandlePrePressOKPositionRecord, typeof(float));
            HMI_Var.PrePressHighPosition = (float)tcAdsClient.ReadAny(iHandle_HMI.iHandlePrePressHighPosition, typeof(float));
            HMI_Var.PrePressHighSpeed = (float)tcAdsClient.ReadAny(iHandle_HMI.iHandlePrePressHighSpeed, typeof(float));
            HMI_Var.PrePressLowPosition = (float)tcAdsClient.ReadAny(iHandle_HMI.iHandlePrePressLowPosition, typeof(float));
            HMI_Var.PrePressLowSpeed = (float)tcAdsClient.ReadAny(iHandle_HMI.iHandlePrePressLowSpeed, typeof(float));
            HMI_Var.PrePressTouchForce = (float)tcAdsClient.ReadAny(iHandle_HMI.iHandlePrePressTouchForce, typeof(float));
            HMI_Var.PrePressForce = (float)tcAdsClient.ReadAny(iHandle_HMI.iHandlePrePressForce, typeof(float));
            HMI_Var.MaxPrePressingTime = (ushort)tcAdsClient.ReadAny(iHandle_HMI.iHandleMaxPrePressingTime, typeof(ushort));
            HMI_Var.Riveting = (bool)tcAdsClient.ReadAny(iHandle_HMI.iHandleRiveting, typeof(bool));
            HMI_Var.RivetingStop = (bool)tcAdsClient.ReadAny(iHandle_HMI.iHandleRivetingStop, typeof(bool));
            HMI_Var.RivetingOK = (bool)tcAdsClient.ReadAny(iHandle_HMI.iHandleRivetingOK, typeof(bool));
            HMI_Var.RivetingNOK = (bool)tcAdsClient.ReadAny(iHandle_HMI.iHandleRivetingNOK, typeof(bool));
            HMI_Var.RivetingTime = (ushort)tcAdsClient.ReadAny(iHandle_HMI.iHandleRivetingTime, typeof(ushort));
            HMI_Var.RivetOKPositionRecord = (float)tcAdsClient.ReadAny(iHandle_HMI.iHandleRivetOKPositionRecord, typeof(float));
            HMI_Var.TechnicsNumber = (UInt32)tcAdsClient.ReadAny(iHandle_HMI.iHandleTechnicsNumber, typeof(UInt32));
            HMI_Var.MultistageId = (ushort)tcAdsClient.ReadAny(iHandle_HMI.iHandleMultistageId, typeof(ushort));
            HMI_Var.MaxRivetingTime = (ushort)tcAdsClient.ReadAny(iHandle_HMI.iHandleMaxRivetingTime, typeof(ushort));
            HMI_Var.Rivet1ing = (bool)tcAdsClient.ReadAny(iHandle_HMI.iHandleRivet1ing, typeof(bool));
            HMI_Var.Rivet1ingStop = (bool)tcAdsClient.ReadAny(iHandle_HMI.iHandleRivet1ingStop, typeof(bool));
            HMI_Var.Rivet1ingOK = (bool)tcAdsClient.ReadAny(iHandle_HMI.iHandleRivet1ingOK, typeof(bool));
            HMI_Var.Rivet1ingNOK = (bool)tcAdsClient.ReadAny(iHandle_HMI.iHandleRivet1ingNOK, typeof(bool));
            HMI_Var.Rivet1ingOK_SpeedJudgment = (bool)tcAdsClient.ReadAny(iHandle_HMI.iHandleRivet1ingOK_SpeedJudgment, typeof(bool));
            HMI_Var.Rivet1ingOK_PositionVariationJudgment = (bool)tcAdsClient.ReadAny(iHandle_HMI.iHandleRivet1ingOK_PositionVariationJudgment, typeof(bool));
            HMI_Var.Rivet1ingOK_TorqueJudgment = (bool)tcAdsClient.ReadAny(iHandle_HMI.iHandleRivet1ingOK_TorqueJudgment, typeof(bool));
            HMI_Var.Rivet1ingOK_PositionJudgment = (bool)tcAdsClient.ReadAny(iHandle_HMI.iHandleRivet1ingOK_PositionJudgment, typeof(bool));
            HMI_Var.Rivet1ingNOK_OverTime = (bool)tcAdsClient.ReadAny(iHandle_HMI.iHandleRivet1ingNOK_OverTime, typeof(bool));
            HMI_Var.Rivet1ingNOK_OverSpeed = (bool)tcAdsClient.ReadAny(iHandle_HMI.iHandleRivet1ingNOK_OverSpeed, typeof(bool));
            HMI_Var.Rivet1ingNOK_OverPosition = (bool)tcAdsClient.ReadAny(iHandle_HMI.iHandleRivet1ingNOK_OverPosition, typeof(bool));
            HMI_Var.Rivet1ingTime = (ushort)tcAdsClient.ReadAny(iHandle_HMI.iHandleRivet1ingTime, typeof(ushort));
            HMI_Var.Rivet1OKPositionRecord = (float)tcAdsClient.ReadAny(iHandle_HMI.iHandleRivet1OKPositionRecord, typeof(float));
            HMI_Var.Rivet1Force = (float)tcAdsClient.ReadAny(iHandle_HMI.iHandleRivet1Force, typeof(float));
            HMI_Var.Rivet1ForceP = (int)tcAdsClient.ReadAny(iHandle_HMI.iHandleRivet1ForceP, typeof(int));
            HMI_Var.Rivet1ForceI = (int)tcAdsClient.ReadAny(iHandle_HMI.iHandleRivet1ForceI, typeof(int));
            HMI_Var.Rivet1RotationalSpeed = (float)tcAdsClient.ReadAny(iHandle_HMI.iHandleRivet1RotationalSpeed, typeof(float));
            HMI_Var.Rivet1RotationalACCTime = (ushort)tcAdsClient.ReadAny(iHandle_HMI.iHandleRivet1RotationalACCTime, typeof(ushort));
            HMI_Var.Rivet1RotationalDECTime = (ushort)tcAdsClient.ReadAny(iHandle_HMI.iHandleRivet1RotationalDECTime, typeof(ushort));
            HMI_Var.Rivet1OKUpPosition = (float)tcAdsClient.ReadAny(iHandle_HMI.iHandleRivet1OKUpPosition, typeof(float));
            HMI_Var.Rivet1OKDownPosition = (float)tcAdsClient.ReadAny(iHandle_HMI.iHandleRivet1OKDownPosition, typeof(float));
            HMI_Var.Rivet1OKSpeedJudgment = (bool)tcAdsClient.ReadAny(iHandle_HMI.iHandleRivet1OKSpeedJudgment, typeof(bool));
            HMI_Var.Rivet1OKSpeed = (float)tcAdsClient.ReadAny(iHandle_HMI.iHandleRivet1OKSpeed, typeof(float));
            HMI_Var.Rivet1OKPositionVariationJudgment = (bool)tcAdsClient.ReadAny(iHandle_HMI.iHandleRivet1OKPositionVariationJudgment, typeof(bool));
            HMI_Var.Rivet1OKPositionVariation = (float)tcAdsClient.ReadAny(iHandle_HMI.iHandleRivet1OKPositionVariation, typeof(float));
            HMI_Var.Rivet1OKPositionVariationSamplintTime = (ushort)tcAdsClient.ReadAny(iHandle_HMI.iHandleRivet1OKPositionVariationSamplintTime, typeof(ushort));
            HMI_Var.Rivet1OKTorqueJudgment = (bool)tcAdsClient.ReadAny(iHandle_HMI.iHandleRivet1OKTorqueJudgment, typeof(bool));
            HMI_Var.Rivet1OKTorque = (float)tcAdsClient.ReadAny(iHandle_HMI.iHandleRivet1OKTorque, typeof(float));
            HMI_Var.Rivet1OKPositionJudgment = (bool)tcAdsClient.ReadAny(iHandle_HMI.iHandleRivet1OKPositionJudgment, typeof(bool));
            HMI_Var.Rivet1OKPosition = (float)tcAdsClient.ReadAny(iHandle_HMI.iHandleRivet1OKPosition, typeof(float));
            HMI_Var.Rivet1MaxSpeed = (float)tcAdsClient.ReadAny(iHandle_HMI.iHandleRivet1MaxSpeed, typeof(float));
            HMI_Var.Rivet1OverTime = (ushort)tcAdsClient.ReadAny(iHandle_HMI.iHandleRivet1OverTime, typeof(ushort));
            HMI_Var.Rivet2ing = (bool)tcAdsClient.ReadAny(iHandle_HMI.iHandleRivet2ing, typeof(bool));
            HMI_Var.Rivet2ingStop = (bool)tcAdsClient.ReadAny(iHandle_HMI.iHandleRivet2ingStop, typeof(bool));
            HMI_Var.Rivet2ingOK = (bool)tcAdsClient.ReadAny(iHandle_HMI.iHandleRivet2ingOK, typeof(bool));
            HMI_Var.Rivet2ingNOK = (bool)tcAdsClient.ReadAny(iHandle_HMI.iHandleRivet2ingNOK, typeof(bool));
            HMI_Var.Rivet2ingOK_SpeedJudgment = (bool)tcAdsClient.ReadAny(iHandle_HMI.iHandleRivet2ingOK_SpeedJudgment, typeof(bool));
            HMI_Var.Rivet2ingOK_PositionVariationJudgment = (bool)tcAdsClient.ReadAny(iHandle_HMI.iHandleRivet2ingOK_PositionVariationJudgment, typeof(bool));
            HMI_Var.Rivet2ingOK_TorqueJudgment = (bool)tcAdsClient.ReadAny(iHandle_HMI.iHandleRivet2ingOK_TorqueJudgment, typeof(bool));
            HMI_Var.Rivet2ingOK_PositionJudgment = (bool)tcAdsClient.ReadAny(iHandle_HMI.iHandleRivet2ingOK_PositionJudgment, typeof(bool));
            HMI_Var.Rivet2ingNOK_OverTime = (bool)tcAdsClient.ReadAny(iHandle_HMI.iHandleRivet2ingNOK_OverTime, typeof(bool));
            HMI_Var.Rivet2ingNOK_OverSpeed = (bool)tcAdsClient.ReadAny(iHandle_HMI.iHandleRivet2ingNOK_OverSpeed, typeof(bool));
            HMI_Var.Rivet2ingNOK_OverPosition = (bool)tcAdsClient.ReadAny(iHandle_HMI.iHandleRivet2ingNOK_OverPosition, typeof(bool));
            HMI_Var.Rivet2ingTime = (ushort)tcAdsClient.ReadAny(iHandle_HMI.iHandleRivet2ingTime, typeof(ushort));
            HMI_Var.Rivet2OKPositionRecord = (float)tcAdsClient.ReadAny(iHandle_HMI.iHandleRivet2OKPositionRecord, typeof(float));
            HMI_Var.Rivet2Force = (float)tcAdsClient.ReadAny(iHandle_HMI.iHandleRivet2Force, typeof(float));
            HMI_Var.Rivet2ForceP = (int)tcAdsClient.ReadAny(iHandle_HMI.iHandleRivet2ForceP, typeof(int));
            HMI_Var.Rivet2ForceI = (int)tcAdsClient.ReadAny(iHandle_HMI.iHandleRivet2ForceI, typeof(int));
            HMI_Var.Rivet2RotationalSpeed = (float)tcAdsClient.ReadAny(iHandle_HMI.iHandleRivet2RotationalSpeed, typeof(float));
            HMI_Var.Rivet2RotationalACCTime = (ushort)tcAdsClient.ReadAny(iHandle_HMI.iHandleRivet2RotationalACCTime, typeof(ushort));
            HMI_Var.Rivet2RotationalDECTime = (ushort)tcAdsClient.ReadAny(iHandle_HMI.iHandleRivet2RotationalDECTime, typeof(ushort));
            HMI_Var.Rivet2OKUpPosition = (float)tcAdsClient.ReadAny(iHandle_HMI.iHandleRivet2OKUpPosition, typeof(float));
            HMI_Var.Rivet2OKDownPosition = (float)tcAdsClient.ReadAny(iHandle_HMI.iHandleRivet2OKDownPosition, typeof(float));
            HMI_Var.Rivet2OKSpeedJudgment = (bool)tcAdsClient.ReadAny(iHandle_HMI.iHandleRivet2OKSpeedJudgment, typeof(bool));
            HMI_Var.Rivet2OKSpeed = (float)tcAdsClient.ReadAny(iHandle_HMI.iHandleRivet2OKSpeed, typeof(float));
            HMI_Var.Rivet2OKPositionVariationJudgment = (bool)tcAdsClient.ReadAny(iHandle_HMI.iHandleRivet2OKPositionVariationJudgment, typeof(bool));
            HMI_Var.Rivet2OKPositionVariation = (float)tcAdsClient.ReadAny(iHandle_HMI.iHandleRivet2OKPositionVariation, typeof(float));
            HMI_Var.Rivet2OKPositionVariationSamplintTime = (ushort)tcAdsClient.ReadAny(iHandle_HMI.iHandleRivet2OKPositionVariationSamplintTime, typeof(ushort));
            HMI_Var.Rivet2OKTorqueJudgment = (bool)tcAdsClient.ReadAny(iHandle_HMI.iHandleRivet2OKTorqueJudgment, typeof(bool));
            HMI_Var.Rivet2OKTorque = (float)tcAdsClient.ReadAny(iHandle_HMI.iHandleRivet2OKTorque, typeof(float));
            HMI_Var.Rivet2OKPositionJudgment = (bool)tcAdsClient.ReadAny(iHandle_HMI.iHandleRivet2OKPositionJudgment, typeof(bool));
            HMI_Var.Rivet2OKPosition = (float)tcAdsClient.ReadAny(iHandle_HMI.iHandleRivet2OKPosition, typeof(float));
            HMI_Var.Rivet2MaxSpeed = (float)tcAdsClient.ReadAny(iHandle_HMI.iHandleRivet2MaxSpeed, typeof(float));
            HMI_Var.Rivet2OverTime = (ushort)tcAdsClient.ReadAny(iHandle_HMI.iHandleRivet2OverTime, typeof(ushort));
            HMI_Var.Rivet3ing = (bool)tcAdsClient.ReadAny(iHandle_HMI.iHandleRivet3ing, typeof(bool));
            HMI_Var.Rivet3ingStop = (bool)tcAdsClient.ReadAny(iHandle_HMI.iHandleRivet3ingStop, typeof(bool));
            HMI_Var.Rivet3ingOK = (bool)tcAdsClient.ReadAny(iHandle_HMI.iHandleRivet3ingOK, typeof(bool));
            HMI_Var.Rivet3ingNOK = (bool)tcAdsClient.ReadAny(iHandle_HMI.iHandleRivet3ingNOK, typeof(bool));
            HMI_Var.Rivet3ingOK_SpeedJudgment = (bool)tcAdsClient.ReadAny(iHandle_HMI.iHandleRivet3ingOK_SpeedJudgment, typeof(bool));
            HMI_Var.Rivet3ingOK_PositionVariationJudgment = (bool)tcAdsClient.ReadAny(iHandle_HMI.iHandleRivet3ingOK_PositionVariationJudgment, typeof(bool));
            HMI_Var.Rivet3ingOK_TorqueJudgment = (bool)tcAdsClient.ReadAny(iHandle_HMI.iHandleRivet3ingOK_TorqueJudgment, typeof(bool));
            HMI_Var.Rivet3ingOK_PositionJudgment = (bool)tcAdsClient.ReadAny(iHandle_HMI.iHandleRivet3ingOK_PositionJudgment, typeof(bool));
            HMI_Var.Rivet3ingNOK_OverTime = (bool)tcAdsClient.ReadAny(iHandle_HMI.iHandleRivet3ingNOK_OverTime, typeof(bool));
            HMI_Var.Rivet3ingNOK_OverSpeed = (bool)tcAdsClient.ReadAny(iHandle_HMI.iHandleRivet3ingNOK_OverSpeed, typeof(bool));
            HMI_Var.Rivet3ingNOK_OverPosition = (bool)tcAdsClient.ReadAny(iHandle_HMI.iHandleRivet3ingNOK_OverPosition, typeof(bool));
            HMI_Var.Rivet3ingTime = (ushort)tcAdsClient.ReadAny(iHandle_HMI.iHandleRivet3ingTime, typeof(ushort));
            HMI_Var.Rivet3OKPositionRecord = (float)tcAdsClient.ReadAny(iHandle_HMI.iHandleRivet3OKPositionRecord, typeof(float));
            HMI_Var.Rivet3Force = (float)tcAdsClient.ReadAny(iHandle_HMI.iHandleRivet3Force, typeof(float));
            HMI_Var.Rivet3ForceP = (int)tcAdsClient.ReadAny(iHandle_HMI.iHandleRivet3ForceP, typeof(int));
            HMI_Var.Rivet3ForceI = (int)tcAdsClient.ReadAny(iHandle_HMI.iHandleRivet3ForceI, typeof(int));
            HMI_Var.Rivet3RotationalSpeed = (float)tcAdsClient.ReadAny(iHandle_HMI.iHandleRivet3RotationalSpeed, typeof(float));
            HMI_Var.Rivet3RotationalACCTime = (ushort)tcAdsClient.ReadAny(iHandle_HMI.iHandleRivet3RotationalACCTime, typeof(ushort));
            HMI_Var.Rivet3RotationalDECTime = (ushort)tcAdsClient.ReadAny(iHandle_HMI.iHandleRivet3RotationalDECTime, typeof(ushort));
            HMI_Var.Rivet3OKUpPosition = (float)tcAdsClient.ReadAny(iHandle_HMI.iHandleRivet3OKUpPosition, typeof(float));
            HMI_Var.Rivet3OKDownPosition = (float)tcAdsClient.ReadAny(iHandle_HMI.iHandleRivet3OKDownPosition, typeof(float));
            HMI_Var.Rivet3OKSpeedJudgment = (bool)tcAdsClient.ReadAny(iHandle_HMI.iHandleRivet3OKSpeedJudgment, typeof(bool));
            HMI_Var.Rivet3OKSpeed = (float)tcAdsClient.ReadAny(iHandle_HMI.iHandleRivet3OKSpeed, typeof(float));
            HMI_Var.Rivet3OKPositionVariationJudgment = (bool)tcAdsClient.ReadAny(iHandle_HMI.iHandleRivet3OKPositionVariationJudgment, typeof(bool));
            HMI_Var.Rivet3OKPositionVariation = (float)tcAdsClient.ReadAny(iHandle_HMI.iHandleRivet3OKPositionVariation, typeof(float));
            HMI_Var.Rivet3OKPositionVariationSamplintTime = (ushort)tcAdsClient.ReadAny(iHandle_HMI.iHandleRivet3OKPositionVariationSamplintTime, typeof(ushort));
            HMI_Var.Rivet3OKTorqueJudgment = (bool)tcAdsClient.ReadAny(iHandle_HMI.iHandleRivet3OKTorqueJudgment, typeof(bool));
            HMI_Var.Rivet3OKTorque = (float)tcAdsClient.ReadAny(iHandle_HMI.iHandleRivet3OKTorque, typeof(float));
            HMI_Var.Rivet3OKPositionJudgment = (bool)tcAdsClient.ReadAny(iHandle_HMI.iHandleRivet3OKPositionJudgment, typeof(bool));
            HMI_Var.Rivet3OKPosition = (float)tcAdsClient.ReadAny(iHandle_HMI.iHandleRivet3OKPosition, typeof(float));
            HMI_Var.Rivet3MaxSpeed = (float)tcAdsClient.ReadAny(iHandle_HMI.iHandleRivet3MaxSpeed, typeof(float));
            HMI_Var.Rivet3OverTime = (ushort)tcAdsClient.ReadAny(iHandle_HMI.iHandleRivet3OverTime, typeof(ushort));


            HMI_Var.MEmgStop = (bool)tcAdsClient.ReadAny(iHandle_HMI.iHandleMEmgStop, typeof(bool));
            HMI_Var.Exc_EmgStop = (bool)tcAdsClient.ReadAny(iHandle_HMI.iHandleExc_EmgStop, typeof(bool));

            HMI_Var.biSwEmgStop = (bool)tcAdsClient.ReadAny(iHandle_HMI.iHandlebiSwEmgStop, typeof(bool));

            if (HMI_Var.biSwEmgStop == true) HMI_Var.biSwEmgStop = false;
            else
                HMI_Var.biSwEmgStop = true;

            HMI_Var.biEbEmgStop = (bool)tcAdsClient.ReadAny(iHandle_HMI.iHandlebiEbEmgStop, typeof(bool));

            if (HMI_Var.biEbEmgStop == true) HMI_Var.biEbEmgStop = false;
            else
                HMI_Var.biEbEmgStop = true;


            HMI_Var.biContactor1 = (bool)tcAdsClient.ReadAny(iHandle_HMI.iHandlebiContactor1, typeof(bool));
            HMI_Var.biContactor2 = (bool)tcAdsClient.ReadAny(iHandle_HMI.iHandlebiContactor2, typeof(bool));
            HMI_Var.biAxis1Ready = (bool)tcAdsClient.ReadAny(iHandle_HMI.iHandlebiAxis1Ready, typeof(bool));
            HMI_Var.biAxis2Ready = (bool)tcAdsClient.ReadAny(iHandle_HMI.iHandlebiAxis2Ready, typeof(bool));
            HMI_Var.biBtRun = (bool)tcAdsClient.ReadAny(iHandle_HMI.iHandlebiBtRun, typeof(bool));
            HMI_Var.biBtReset = (bool)tcAdsClient.ReadAny(iHandle_HMI.iHandlebiBtReset, typeof(bool));
            HMI_Var.biTotaInAirPresRch1 = (bool)tcAdsClient.ReadAny(iHandle_HMI.iHandlebiTotaInAirPresRch1, typeof(bool));
            HMI_Var.biTotaInAirPresRch2 = (bool)tcAdsClient.ReadAny(iHandle_HMI.iHandlebiTotaInAirPresRch2, typeof(bool));


            HMI_Var.RefFeedMachPushRivetValve = (bool)tcAdsClient.ReadAny(iHandle_HMI.iHandleRefFeedMachPushRivetValve, typeof(bool));
            HMI_Var.RefFeedMachBlowRivetValve = (bool)tcAdsClient.ReadAny(iHandle_HMI.iHandleRefFeedMachBlowRivetValve, typeof(bool));
            HMI_Var.RefClampValve = (bool)tcAdsClient.ReadAny(iHandle_HMI.iHandleRefClampValve, typeof(bool));
            HMI_Var.RefCachePlacePushRivetValve = (bool)tcAdsClient.ReadAny(iHandle_HMI.iHandleRefCachePlacePushRivetValve, typeof(bool));
            HMI_Var.RefCachePlaceBlowRivetValve = (bool)tcAdsClient.ReadAny(iHandle_HMI.iHandleRefCachePlaceBlowRivetValve, typeof(bool));
            HMI_Var.RefEnableVacuoValve = (bool)tcAdsClient.ReadAny(iHandle_HMI.iHandleRefEnableVacuoValve, typeof(bool));
            HMI_Var.RefDisableVacuoValve = (bool)tcAdsClient.ReadAny(iHandle_HMI.iHandleRefDisableVacuoValve, typeof(bool));
            HMI_Var.RefGunHeadBlowRivetValve = (bool)tcAdsClient.ReadAny(iHandle_HMI.iHandleRefGunHeadBlowRivetValve, typeof(bool));
            HMI_Var.RefPrePressureExtendValve = (bool)tcAdsClient.ReadAny(iHandle_HMI.iHandleRefPrePressureExtendValve, typeof(bool));
            HMI_Var.RefPrePressureRetractValve = (bool)tcAdsClient.ReadAny(iHandle_HMI.iHandleRefPrePressureRetractValve, typeof(bool));







            HMI_Var.biVacuoValueRch1 = (bool)tcAdsClient.ReadAny(iHandle_HMI.iHandlebiVacuoValueRch1, typeof(bool));
            HMI_Var.btManualInhaleRivet = (bool)tcAdsClient.ReadAny(iHandle_HMI.iHandlebtManualInhaleRivet, typeof(bool));
            HMI_Var.RefVacuoValve_Manual = (bool)tcAdsClient.ReadAny(iHandle_HMI.iHandleRefVacuoValve_Manual, typeof(bool));
            HMI_Var.btManualFeed = (bool)tcAdsClient.ReadAny(iHandle_HMI.iHandlebtManualFeed, typeof(bool));
            HMI_Var.btManualPrePress = (bool)tcAdsClient.ReadAny(iHandle_HMI.iHandlebtManualPrePress, typeof(bool));
            HMI_Var.btManualRivet = (bool)tcAdsClient.ReadAny(iHandle_HMI.iHandlebtManualRivet, typeof(bool));






            CommonMethods.CurrentValue["_03_HMI.SysIsReady"] = HMI_Var.SysIsReady.ToString();
            CommonMethods.CurrentValue["_03_HMI.SysAlarmActive"] = HMI_Var.SysAlarmActive.ToString();
            CommonMethods.CurrentValue["_03_HMI.SysNotEmgStop"] = HMI_Var.SysNotEmgStop.ToString();
            CommonMethods.CurrentValue["_03_HMI.ErrDoorOpen"] = HMI_Var.ErrDoorOpen.ToString();
            CommonMethods.CurrentValue["_03_HMI.SysManualMode"] = HMI_Var.SysManualMode.ToString();
            CommonMethods.CurrentValue["_03_HMI.SysAutoMode"] = HMI_Var.SysAutoMode.ToString();
            CommonMethods.CurrentValue["_03_HMI.SysExcMode"] = HMI_Var.SysExcMode.ToString();
            CommonMethods.CurrentValue["_03_HMI.SysDebugMode"] = HMI_Var.SysDebugMode.ToString();
            CommonMethods.CurrentValue["_03_HMI.SysStep"] = HMI_Var.SysStep.ToString();
            CommonMethods.CurrentValue["_03_HMI.ManualStep"] = HMI_Var.ManualStep.ToString();
            CommonMethods.CurrentValue["_03_HMI.AutoStep"] = HMI_Var.AutoStep.ToString();
            CommonMethods.CurrentValue["_03_HMI.ExcStep"] = HMI_Var.ExcStep.ToString();
            CommonMethods.CurrentValue["_03_HMI.DebugStep"] = HMI_Var.DebugStep.ToString();
            CommonMethods.CurrentValue["_03_HMI.DataPressure"] = HMI_Var.DataPressure.ToString();
            CommonMethods.CurrentValue["_03_HMI.DataTorque"] = HMI_Var.DataTorque.ToString();
            CommonMethods.CurrentValue["_03_HMI.ActVelo2"] = HMI_Var.ActVelo2.ToString();
            CommonMethods.CurrentValue["_03_HMI.ActVelo1"] = HMI_Var.ActVelo1.ToString();
            CommonMethods.CurrentValue["_03_HMI.ActPos2"] = HMI_Var.ActPos2.ToString();
            CommonMethods.CurrentValue["_03_HMI.MaxPressure"] = HMI_Var.MaxPressure.ToString();
            CommonMethods.CurrentValue["_03_HMI.MaxTorque"] = HMI_Var.MaxTorque.ToString();
            CommonMethods.CurrentValue["_03_HMI.Timer"] = HMI_Var.Timer.ToString();
            CommonMethods.CurrentValue["_03_HMI.status1"] = HMI_Var.status1.ToString();
            CommonMethods.CurrentValue["_03_HMI.status2"] = HMI_Var.status2.ToString();
            CommonMethods.CurrentValue["_03_HMI.status3"] = HMI_Var.status3.ToString();
            CommonMethods.CurrentValue["_03_HMI.status4"] = HMI_Var.status4.ToString();
            CommonMethods.CurrentValue["_03_HMI.status5"] = HMI_Var.status5.ToString();
            CommonMethods.CurrentValue["_03_HMI.status6"] = HMI_Var.status6.ToString();
            CommonMethods.CurrentValue["_03_HMI.status7"] = HMI_Var.status7.ToString();
            CommonMethods.CurrentValue["_03_HMI.status8"] = HMI_Var.status8.ToString();
            CommonMethods.CurrentValue["_03_HMI.btDebug"] = HMI_Var.btDebug.ToString();
            CommonMethods.CurrentValue["_03_HMI.btMotorDebug"] = HMI_Var.btMotorDebug.ToString();
            CommonMethods.CurrentValue["_03_HMI.btFeedTest"] = HMI_Var.btFeedTest.ToString();
            CommonMethods.CurrentValue["_03_HMI.Enabled1"] = HMI_Var.Enabled1.ToString();
            CommonMethods.CurrentValue["_03_HMI.Error1"] = HMI_Var.Error1.ToString();
            CommonMethods.CurrentValue["_03_HMI.JogVelocity1"] = HMI_Var.JogVelocity1.ToString();
            CommonMethods.CurrentValue["_03_HMI.btManualJogF1"] = HMI_Var.btManualJogF1.ToString();
            CommonMethods.CurrentValue["_03_HMI.btManualJogB1"] = HMI_Var.btManualJogB1.ToString();
            CommonMethods.CurrentValue["_03_HMI.btManualPower1"] = HMI_Var.btManualPower1.ToString();
            CommonMethods.CurrentValue["_03_HMI.btReset1"] = HMI_Var.btReset1.ToString();
            CommonMethods.CurrentValue["_03_HMI.Enabled2"] = HMI_Var.Enabled2.ToString();
            string str = CommonMethods.CurrentValue["_03_HMI.Enabled2"].ToString();
            CommonMethods.CurrentValue["_03_HMI.Error2"] = HMI_Var.Error2.ToString();
          
            CommonMethods.CurrentValue["_03_HMI.MotorDebug_Axis2SetVelo"] = HMI_Var.MotorDebug_Axis2SetVelo.ToString();
            CommonMethods.CurrentValue["_03_HMI.MotorDebug_Axis2SetPos"] = HMI_Var.MotorDebug_Axis2SetPos.ToString();
            CommonMethods.CurrentValue["_03_HMI.MotorDebug_Axis2SwitchForce"] = HMI_Var.MotorDebug_Axis2SwitchForce.ToString();
            CommonMethods.CurrentValue["_03_HMI.MotorDebug_Axis2SetForce"] = HMI_Var.MotorDebug_Axis2SetForce.ToString();
            CommonMethods.CurrentValue["_03_HMI.MotorDebug_Axis2ForcePosLimit"] = HMI_Var.MotorDebug_Axis2ForcePosLimit.ToString();
            CommonMethods.CurrentValue["_03_HMI.MotorDebug_Axis2JOGMinus"] = HMI_Var.MotorDebug_Axis2JOGMinus.ToString();
            CommonMethods.CurrentValue["_03_HMI.MotorDebug_Axis2JOGPlus"] = HMI_Var.MotorDebug_Axis2JOGPlus.ToString();
            CommonMethods.CurrentValue["_03_HMI.MotorDebug_Axis2HOME"] = HMI_Var.MotorDebug_Axis2HOME.ToString();
            CommonMethods.CurrentValue["_03_HMI.MotorDebug_Axis2PoStart"] = HMI_Var.MotorDebug_Axis2PoStart.ToString();
            CommonMethods.CurrentValue["_03_HMI.MotorDebug_Axis2ForceStart"] = HMI_Var.MotorDebug_Axis2ForceStart.ToString();
            CommonMethods.CurrentValue["_03_HMI.MotorDebug_Axis2STOP"] = HMI_Var.MotorDebug_Axis2STOP.ToString();
            CommonMethods.CurrentValue["_03_HMI.MotorDebug_Axis2Reset"] = HMI_Var.MotorDebug_Axis2Reset.ToString();
            CommonMethods.CurrentValue["_03_HMI.Feeding"] = HMI_Var.Feeding.ToString();
            CommonMethods.CurrentValue["_03_HMI.FeedingStop"] = HMI_Var.FeedingStop.ToString();
            CommonMethods.CurrentValue["_03_HMI.FeedingOK"] = HMI_Var.FeedingOK.ToString();
            CommonMethods.CurrentValue["_03_HMI.FeedingNOK"] = HMI_Var.FeedingNOK.ToString();
            CommonMethods.CurrentValue["_03_HMI.FeedingTime"] = HMI_Var.FeedingTime.ToString();
            CommonMethods.CurrentValue["_03_HMI.MaxFeedingTime"] = HMI_Var.MaxFeedingTime.ToString();
            CommonMethods.CurrentValue["_03_HMI.btFeed"] = HMI_Var.btFeed.ToString();
            CommonMethods.CurrentValue["_03_HMI.btFeedingTestStart_Stop"] = HMI_Var.btFeedingTestStart_Stop.ToString();
            CommonMethods.CurrentValue["_03_HMI.btDay_Night"] = HMI_Var.btDay_Night.ToString();
            CommonMethods.CurrentValue["_03_HMI.FeedMachModel"] = HMI_Var.FeedMachModel.ToString();
            CommonMethods.CurrentValue["_03_HMI.btFeedMachPushRivetValve"] = HMI_Var.btFeedMachPushRivetValve.ToString();
            CommonMethods.CurrentValue["_03_HMI.btFeedMachBlowRivetValve"] = HMI_Var.btFeedMachBlowRivetValve.ToString();
            CommonMethods.CurrentValue["_03_HMI.FeedMachRivetOK"] = HMI_Var.FeedMachRivetOK.ToString();
            CommonMethods.CurrentValue["_03_HMI.FeedMachPushRivetBasic"] = HMI_Var.FeedMachPushRivetBasic.ToString();
            CommonMethods.CurrentValue["_03_HMI.FeedMachPushRivetWork"] = HMI_Var.FeedMachPushRivetWork.ToString();
            CommonMethods.CurrentValue["_03_HMI.FeedMachRivetOut"] = HMI_Var.FeedMachRivetOut.ToString();
            CommonMethods.CurrentValue["_03_HMI.FeedMachLastCycleCounter"] = HMI_Var.FeedMachLastCycleCounter.ToString();
            CommonMethods.CurrentValue["_03_HMI.FeedMachNowCycleCounter"] = HMI_Var.FeedMachNowCycleCounter.ToString();
            CommonMethods.CurrentValue["_03_HMI.FeedMachRivetOutCounter"] = HMI_Var.FeedMachRivetOutCounter.ToString();
            CommonMethods.CurrentValue["_03_HMI.btFeedMachLastCycleCounterClean"] = HMI_Var.btFeedMachLastCycleCounterClean.ToString();
            CommonMethods.CurrentValue["_03_HMI.btFeedMachNowCycleCounterClean"] = HMI_Var.btFeedMachNowCycleCounterClean.ToString();
            CommonMethods.CurrentValue["_03_HMI.btFeedMachRivetOutCounterClean"] = HMI_Var.btFeedMachRivetOutCounterClean.ToString();
            CommonMethods.CurrentValue["_03_HMI.FeedMachNowCycleing"] = HMI_Var.FeedMachNowCycleing.ToString();
            CommonMethods.CurrentValue["_03_HMI.FeedMachBlowRivetOverTimeAlarm"] = HMI_Var.FeedMachBlowRivetOverTimeAlarm.ToString();
            CommonMethods.CurrentValue["_03_HMI.FeedMachBlowRivetOverTimeReset"] = HMI_Var.FeedMachBlowRivetOverTimeReset.ToString();
            CommonMethods.CurrentValue["_03_HMI.FeedMachRivetOutOverTimeAlarm"] = HMI_Var.FeedMachRivetOutOverTimeAlarm.ToString();
            CommonMethods.CurrentValue["_03_HMI.FeedMachRivetOutOverTimeReset"] = HMI_Var.FeedMachRivetOutOverTimeReset.ToString();
            CommonMethods.CurrentValue["_03_HMI.FeedMachRivetOutOverTime"] = HMI_Var.FeedMachRivetOutOverTime.ToString();
            CommonMethods.CurrentValue["_03_HMI.btClampValve"] = HMI_Var.btClampValve.ToString();
            CommonMethods.CurrentValue["_03_HMI.btCachePlacePushRivetValve"] = HMI_Var.btCachePlacePushRivetValve.ToString();
            CommonMethods.CurrentValue["_03_HMI.btCachePlaceBlowRivetValve"] = HMI_Var.btCachePlaceBlowRivetValve.ToString();
            CommonMethods.CurrentValue["_03_HMI.btEnableVacuoValve"] = HMI_Var.btEnableVacuoValve.ToString();
            CommonMethods.CurrentValue["_03_HMI.btDisableVacuoValve"] = HMI_Var.btDisableVacuoValve.ToString();
            CommonMethods.CurrentValue["_03_HMI.btGunHeadBlowRivetValve"] = HMI_Var.btGunHeadBlowRivetValve.ToString();
            CommonMethods.CurrentValue["_03_HMI.btPrePressureExtendValve"] = HMI_Var.btPrePressureExtendValve.ToString();
            CommonMethods.CurrentValue["_03_HMI.btPrePressureRetractValve"] = HMI_Var.btPrePressureRetractValve.ToString();
            CommonMethods.CurrentValue["_03_HMI.CachePlaceRivetIn"] = HMI_Var.CachePlaceRivetIn.ToString();
            CommonMethods.CurrentValue["_03_HMI.CachePlaceRivetOut"] = HMI_Var.CachePlaceRivetOut.ToString();
            CommonMethods.CurrentValue["_03_HMI.GunHeadRivetIn"] = HMI_Var.GunHeadRivetIn.ToString();
            CommonMethods.CurrentValue["_03_HMI.CachePlaceRivetAt"] = HMI_Var.CachePlaceRivetAt.ToString();
            CommonMethods.CurrentValue["_03_HMI.ClampWork"] = HMI_Var.ClampWork.ToString();
            CommonMethods.CurrentValue["_03_HMI.ClampBasic"] = HMI_Var.ClampBasic.ToString();
            CommonMethods.CurrentValue["_03_HMI.CachePlacePushRivetWork"] = HMI_Var.CachePlacePushRivetWork.ToString();
            CommonMethods.CurrentValue["_03_HMI.CachePlacePushRivetBasic"] = HMI_Var.CachePlacePushRivetBasic.ToString();
            CommonMethods.CurrentValue["_03_HMI.PrePressureWork1"] = HMI_Var.PrePressureWork1.ToString();
            CommonMethods.CurrentValue["_03_HMI.PrePressureBasic1"] = HMI_Var.PrePressureBasic1.ToString();
            CommonMethods.CurrentValue["_03_HMI.PrePressureWork2"] = HMI_Var.PrePressureWork2.ToString();
            CommonMethods.CurrentValue["_03_HMI.PrePressureBasic2"] = HMI_Var.PrePressureBasic2.ToString();
            CommonMethods.CurrentValue["_03_HMI.VacuoValueRch1"] = HMI_Var.VacuoValueRch1.ToString();
            CommonMethods.CurrentValue["_03_HMI.LimitSwitchUp"] = HMI_Var.LimitSwitchUp.ToString();
            CommonMethods.CurrentValue["_03_HMI.LimitSwitchOrigin"] = HMI_Var.LimitSwitchOrigin.ToString();
            CommonMethods.CurrentValue["_03_HMI.LimitSwitchDown"] = HMI_Var.LimitSwitchDown.ToString();
            CommonMethods.CurrentValue["_03_HMI.GunLastCycleCounter"] = HMI_Var.GunLastCycleCounter.ToString();
            CommonMethods.CurrentValue["_03_HMI.GunNowCycleCounter"] = HMI_Var.GunNowCycleCounter.ToString();
            CommonMethods.CurrentValue["_03_HMI.CachePlaceRivetInCounter"] = HMI_Var.CachePlaceRivetInCounter.ToString();
            CommonMethods.CurrentValue["_03_HMI.RivetInCounter"] = HMI_Var.RivetInCounter.ToString();
            CommonMethods.CurrentValue["_03_HMI.RivetOutCounter"] = HMI_Var.RivetOutCounter.ToString();
            CommonMethods.CurrentValue["_03_HMI.InhaleRivetOKCounter"] = HMI_Var.InhaleRivetOKCounter.ToString();
            CommonMethods.CurrentValue["_03_HMI.InhaleRivetNOKCounter"] = HMI_Var.InhaleRivetNOKCounter.ToString();
            CommonMethods.CurrentValue["_03_HMI.btCounterClear"] = HMI_Var.btCounterClear.ToString();
            CommonMethods.CurrentValue["_03_HMI.btGunLastCycleCounterClean"] = HMI_Var.btGunLastCycleCounterClean.ToString();
            CommonMethods.CurrentValue["_03_HMI.btGunNowCycleCounterClean"] = HMI_Var.btGunNowCycleCounterClean.ToString();
            CommonMethods.CurrentValue["_03_HMI.btCachePlaceRivetInCounterClean"] = HMI_Var.btCachePlaceRivetInCounterClean.ToString();
            CommonMethods.CurrentValue["_03_HMI.btCachePlaceRivetOutCounterClean"] = HMI_Var.btCachePlaceRivetOutCounterClean.ToString();
            CommonMethods.CurrentValue["_03_HMI.btGunHeadRivetInCounterClean"] = HMI_Var.btGunHeadRivetInCounterClean.ToString();
            CommonMethods.CurrentValue["_03_HMI.btInhaleRivetOKCounterClean"] = HMI_Var.btInhaleRivetOKCounterClean.ToString();
            CommonMethods.CurrentValue["_03_HMI.btInhaleRivetNOKCounterClean"] = HMI_Var.btInhaleRivetNOKCounterClean.ToString();
            CommonMethods.CurrentValue["_03_HMI.btInhaleRivetActualCounterClean"] = HMI_Var.btInhaleRivetActualCounterClean.ToString();
            CommonMethods.CurrentValue["_03_HMI.GunNowCycleing"] = HMI_Var.GunNowCycleing.ToString();
            CommonMethods.CurrentValue["_03_HMI.CachePlaceRivetInOverTimeAlarm"] = HMI_Var.CachePlaceRivetInOverTimeAlarm.ToString();
            CommonMethods.CurrentValue["_03_HMI.CachePlaceRivetInOverTimeReset"] = HMI_Var.CachePlaceRivetInOverTimeReset.ToString();
            CommonMethods.CurrentValue["_03_HMI.CachePlaceRivetAtOverTimeAlarm"] = HMI_Var.CachePlaceRivetAtOverTimeAlarm.ToString();
            CommonMethods.CurrentValue["_03_HMI.CachePlaceRivetAtOverTimeReset"] = HMI_Var.CachePlaceRivetAtOverTimeReset.ToString();
            CommonMethods.CurrentValue["_03_HMI.CachePlaceBlowRivetOverTimeAlarm"] = HMI_Var.CachePlaceBlowRivetOverTimeAlarm.ToString();
            CommonMethods.CurrentValue["_03_HMI.CachePlaceBlowRivetOverTimeReset"] = HMI_Var.CachePlaceBlowRivetOverTimeReset.ToString();
            CommonMethods.CurrentValue["_03_HMI.CachePlaceRivetOutOverTimeAlarm"] = HMI_Var.CachePlaceRivetOutOverTimeAlarm.ToString();
            CommonMethods.CurrentValue["_03_HMI.CachePlaceRivetOutOverTimeReset"] = HMI_Var.CachePlaceRivetOutOverTimeReset.ToString();
            CommonMethods.CurrentValue["_03_HMI.GunHeadRivetInOverTimeAlarm"] = HMI_Var.GunHeadRivetInOverTimeAlarm.ToString();
            CommonMethods.CurrentValue["_03_HMI.GunHeadRivetInOverTimeReset"] = HMI_Var.GunHeadRivetInOverTimeReset.ToString();
            CommonMethods.CurrentValue["_03_HMI.FeedingNOKLater_CycleContinue"] = HMI_Var.FeedingNOKLater_CycleContinue.ToString();
            CommonMethods.CurrentValue["_03_HMI.InhaleRivetLater_DisableVacuoAlarm"] = HMI_Var.InhaleRivetLater_DisableVacuoAlarm.ToString();
            CommonMethods.CurrentValue["_03_HMI.InhaleRivetLater_DisableVacuoReset"] = HMI_Var.InhaleRivetLater_DisableVacuoReset.ToString();
            CommonMethods.CurrentValue["_03_HMI.EnableVacuoValveLater_SampleTime1"] = HMI_Var.EnableVacuoValveLater_SampleTime1.ToString();
            CommonMethods.CurrentValue["_03_HMI.EnableVacuoValveLater_SampleTime2"] = HMI_Var.EnableVacuoValveLater_SampleTime2.ToString();
            CommonMethods.CurrentValue["_03_HMI.VacuoRchLater_SampleTime"] = HMI_Var.VacuoRchLater_SampleTime.ToString();
            CommonMethods.CurrentValue["_03_HMI.CachePlaceRivetInOverTime"] = HMI_Var.CachePlaceRivetInOverTime.ToString();
            CommonMethods.CurrentValue["_03_HMI.CachePlaceRivetAtOverTime"] = HMI_Var.CachePlaceRivetAtOverTime.ToString();
            CommonMethods.CurrentValue["_03_HMI.CachePlaceRivetAtHeartbeatTime"] = HMI_Var.CachePlaceRivetAtHeartbeatTime.ToString();
            CommonMethods.CurrentValue["_03_HMI.CachePlaceRivetOutOverTime"] = HMI_Var.CachePlaceRivetOutOverTime.ToString();
            CommonMethods.CurrentValue["_03_HMI.GunHeadRivetInOverTime"] = HMI_Var.GunHeadRivetInOverTime.ToString();
            CommonMethods.CurrentValue["_03_HMI.GunHeadRivetIn_EnableVacuoValveDelayTime"] = HMI_Var.GunHeadRivetIn_EnableVacuoValveDelayTime.ToString();
            CommonMethods.CurrentValue["_03_HMI.FeedTest_InhaleRivetMaxTime"] = HMI_Var.FeedTest_InhaleRivetMaxTime.ToString();
            CommonMethods.CurrentValue["_03_HMI.FeedTest_InhaleRivetIntervalTime"] = HMI_Var.FeedTest_InhaleRivetIntervalTime.ToString();
            CommonMethods.CurrentValue["_03_HMI.FeedTest_InhaleRivetMaxCounter"] = HMI_Var.FeedTest_InhaleRivetMaxCounter.ToString();
            CommonMethods.CurrentValue["_03_HMI.PrePressureSetValue"] = HMI_Var.PrePressureSetValue.ToString();
            CommonMethods.CurrentValue["_03_HMI.FeedPos1"] = HMI_Var.FeedPos1.ToString();
            CommonMethods.CurrentValue["_03_HMI.FeedTest_InhaleRivetTargetPos"] = HMI_Var.FeedTest_InhaleRivetTargetPos.ToString();
            CommonMethods.CurrentValue["_03_HMI.FeedTest_Velo1"] = HMI_Var.FeedTest_Velo1.ToString();
            CommonMethods.CurrentValue["_03_HMI.FeedTest_Acc1"] = HMI_Var.FeedTest_Acc1.ToString();
            CommonMethods.CurrentValue["_03_HMI.FeedTest_Dec1"] = HMI_Var.FeedTest_Dec1.ToString();
            CommonMethods.CurrentValue["_03_HMI.FeedTest_Jerk1"] = HMI_Var.FeedTest_Jerk1.ToString();
            CommonMethods.CurrentValue["_03_HMI.FeedTest_Velo2"] = HMI_Var.FeedTest_Velo2.ToString();
            CommonMethods.CurrentValue["_03_HMI.FeedTest_Acc2"] = HMI_Var.FeedTest_Acc2.ToString();
            CommonMethods.CurrentValue["_03_HMI.FeedTest_Dec2"] = HMI_Var.FeedTest_Dec2.ToString();
            CommonMethods.CurrentValue["_03_HMI.FeedTest_Jerk2"] = HMI_Var.FeedTest_Jerk2.ToString();
            CommonMethods.CurrentValue["_03_HMI.EnableVacuoValveLater_VacuoValue1"] = HMI_Var.EnableVacuoValveLater_VacuoValue1.ToString();
            CommonMethods.CurrentValue["_03_HMI.EnableVacuoValveLater_VacuoValue2"] = HMI_Var.EnableVacuoValveLater_VacuoValue2.ToString();
            CommonMethods.CurrentValue["_03_HMI.SingleCycleVacuoValue"] = HMI_Var.SingleCycleVacuoValue.ToString();
            CommonMethods.CurrentValue["_03_HMI.EnableVacuoValve_VacuoRchTime"] = HMI_Var.EnableVacuoValve_VacuoRchTime.ToString();
            CommonMethods.CurrentValue["_03_HMI.TestFeedingTime"] = HMI_Var.TestFeedingTime.ToString();
            CommonMethods.CurrentValue["_03_HMI.InhaleRivetActualCounter"] = HMI_Var.InhaleRivetActualCounter.ToString();
            CommonMethods.CurrentValue["_03_HMI.VacuoValue1"] = HMI_Var.VacuoValue1.ToString();
            CommonMethods.CurrentValue["_03_HMI.PrePressureRefValue"] = HMI_Var.PrePressureRefValue.ToString();
            CommonMethods.CurrentValue["_03_HMI.PrePressing"] = HMI_Var.PrePressing.ToString();
            CommonMethods.CurrentValue["_03_HMI.PrePressingStop"] = HMI_Var.PrePressingStop.ToString();
            CommonMethods.CurrentValue["_03_HMI.PrePressingOK"] = HMI_Var.PrePressingOK.ToString();
            CommonMethods.CurrentValue["_03_HMI.PrePressingNOK"] = HMI_Var.PrePressingNOK.ToString();
            CommonMethods.CurrentValue["_03_HMI.PrePressingNOK_OverTime"] = HMI_Var.PrePressingNOK_OverTime.ToString();
            CommonMethods.CurrentValue["_03_HMI.PrePressingNOK_NOTVacuo"] = HMI_Var.PrePressingNOK_NOTVacuo.ToString();
            CommonMethods.CurrentValue["_03_HMI.PrePressingNOK_OverPosition"] = HMI_Var.PrePressingNOK_OverPosition.ToString();
            CommonMethods.CurrentValue["_03_HMI.PrePressingTime"] = HMI_Var.PrePressingTime.ToString();
            CommonMethods.CurrentValue["_03_HMI.PrePressOKPositionRecord"] = HMI_Var.PrePressOKPositionRecord.ToString();
            CommonMethods.CurrentValue["_03_HMI.PrePressHighPosition"] = HMI_Var.PrePressHighPosition.ToString();
            CommonMethods.CurrentValue["_03_HMI.PrePressHighSpeed"] = HMI_Var.PrePressHighSpeed.ToString();
            CommonMethods.CurrentValue["_03_HMI.PrePressLowPosition"] = HMI_Var.PrePressLowPosition.ToString();
            CommonMethods.CurrentValue["_03_HMI.PrePressLowSpeed"] = HMI_Var.PrePressLowSpeed.ToString();
            CommonMethods.CurrentValue["_03_HMI.PrePressTouchForce"] = HMI_Var.PrePressTouchForce.ToString();
            CommonMethods.CurrentValue["_03_HMI.PrePressForce"] = HMI_Var.PrePressForce.ToString();
            CommonMethods.CurrentValue["_03_HMI.MaxPrePressingTime"] = HMI_Var.MaxPrePressingTime.ToString();
            CommonMethods.CurrentValue["_03_HMI.Riveting"] = HMI_Var.Riveting.ToString();
            CommonMethods.CurrentValue["_03_HMI.RivetingStop"] = HMI_Var.RivetingStop.ToString();
            CommonMethods.CurrentValue["_03_HMI.RivetingOK"] = HMI_Var.RivetingOK.ToString();
            CommonMethods.CurrentValue["_03_HMI.RivetingNOK"] = HMI_Var.RivetingNOK.ToString();
            CommonMethods.CurrentValue["_03_HMI.RivetingTime"] = HMI_Var.RivetingTime.ToString();
            CommonMethods.CurrentValue["_03_HMI.RivetOKPositionRecord"] = HMI_Var.RivetOKPositionRecord.ToString();
            CommonMethods.CurrentValue["_03_HMI.TechnicsNumber"] = HMI_Var.TechnicsNumber.ToString();
            CommonMethods.CurrentValue["_03_HMI.MultistageId"] = HMI_Var.MultistageId.ToString();
            CommonMethods.CurrentValue["_03_HMI.MaxRivetingTime"] = HMI_Var.MaxRivetingTime.ToString();
            CommonMethods.CurrentValue["_03_HMI.Rivet1ing"] = HMI_Var.Rivet1ing.ToString();
            CommonMethods.CurrentValue["_03_HMI.Rivet1ingStop"] = HMI_Var.Rivet1ingStop.ToString();
            CommonMethods.CurrentValue["_03_HMI.Rivet1ingOK"] = HMI_Var.Rivet1ingOK.ToString();
            CommonMethods.CurrentValue["_03_HMI.Rivet1ingNOK"] = HMI_Var.Rivet1ingNOK.ToString();
            CommonMethods.CurrentValue["_03_HMI.Rivet1ingOK_SpeedJudgment"] = HMI_Var.Rivet1ingOK_SpeedJudgment.ToString();
            CommonMethods.CurrentValue["_03_HMI.Rivet1ingOK_PositionVariationJudgment"] = HMI_Var.Rivet1ingOK_PositionVariationJudgment.ToString();
            CommonMethods.CurrentValue["_03_HMI.Rivet1ingOK_TorqueJudgment"] = HMI_Var.Rivet1ingOK_TorqueJudgment.ToString();
            CommonMethods.CurrentValue["_03_HMI.Rivet1ingOK_PositionJudgment"] = HMI_Var.Rivet1ingOK_PositionJudgment.ToString();
            CommonMethods.CurrentValue["_03_HMI.Rivet1ingNOK_OverTime"] = HMI_Var.Rivet1ingNOK_OverTime.ToString();
            CommonMethods.CurrentValue["_03_HMI.Rivet1ingNOK_OverSpeed"] = HMI_Var.Rivet1ingNOK_OverSpeed.ToString();
            CommonMethods.CurrentValue["_03_HMI.Rivet1ingNOK_OverPosition"] = HMI_Var.Rivet1ingNOK_OverPosition.ToString();
            CommonMethods.CurrentValue["_03_HMI.Rivet1ingTime"] = HMI_Var.Rivet1ingTime.ToString();
            CommonMethods.CurrentValue["_03_HMI.Rivet1OKPositionRecord"] = HMI_Var.Rivet1OKPositionRecord.ToString();
            CommonMethods.CurrentValue["_03_HMI.Rivet1Force"] = HMI_Var.Rivet1Force.ToString();
            CommonMethods.CurrentValue["_03_HMI.Rivet1ForceP"] = HMI_Var.Rivet1ForceP.ToString();
            CommonMethods.CurrentValue["_03_HMI.Rivet1ForceI"] = HMI_Var.Rivet1ForceI.ToString();
            CommonMethods.CurrentValue["_03_HMI.Rivet1RotationalSpeed"] = HMI_Var.Rivet1RotationalSpeed.ToString();
            CommonMethods.CurrentValue["_03_HMI.Rivet1RotationalACCTime"] = HMI_Var.Rivet1RotationalACCTime.ToString();
            CommonMethods.CurrentValue["_03_HMI.Rivet1RotationalDECTime"] = HMI_Var.Rivet1RotationalDECTime.ToString();
            CommonMethods.CurrentValue["_03_HMI.Rivet1OKUpPosition"] = HMI_Var.Rivet1OKUpPosition.ToString();
            CommonMethods.CurrentValue["_03_HMI.Rivet1OKDownPosition"] = HMI_Var.Rivet1OKDownPosition.ToString();
            CommonMethods.CurrentValue["_03_HMI.Rivet1OKSpeedJudgment"] = HMI_Var.Rivet1OKSpeedJudgment.ToString();
            CommonMethods.CurrentValue["_03_HMI.Rivet1OKSpeed"] = HMI_Var.Rivet1OKSpeed.ToString();
            CommonMethods.CurrentValue["_03_HMI.Rivet1OKPositionVariationJudgment"] = HMI_Var.Rivet1OKPositionVariationJudgment.ToString();
            CommonMethods.CurrentValue["_03_HMI.Rivet1OKPositionVariation"] = HMI_Var.Rivet1OKPositionVariation.ToString();
            CommonMethods.CurrentValue["_03_HMI.Rivet1OKPositionVariationSamplintTime"] = HMI_Var.Rivet1OKPositionVariationSamplintTime.ToString();
            CommonMethods.CurrentValue["_03_HMI.Rivet1OKTorqueJudgment"] = HMI_Var.Rivet1OKTorqueJudgment.ToString();
            CommonMethods.CurrentValue["_03_HMI.Rivet1OKTorque"] = HMI_Var.Rivet1OKTorque.ToString();
            CommonMethods.CurrentValue["_03_HMI.Rivet1OKPositionJudgment"] = HMI_Var.Rivet1OKPositionJudgment.ToString();
            CommonMethods.CurrentValue["_03_HMI.Rivet1OKPosition"] = HMI_Var.Rivet1OKPosition.ToString();
            CommonMethods.CurrentValue["_03_HMI.Rivet1MaxSpeed"] = HMI_Var.Rivet1MaxSpeed.ToString();
            CommonMethods.CurrentValue["_03_HMI.Rivet1OverTime"] = HMI_Var.Rivet1OverTime.ToString();
            CommonMethods.CurrentValue["_03_HMI.Rivet2ing"] = HMI_Var.Rivet2ing.ToString();
            CommonMethods.CurrentValue["_03_HMI.Rivet2ingStop"] = HMI_Var.Rivet2ingStop.ToString();
            CommonMethods.CurrentValue["_03_HMI.Rivet2ingOK"] = HMI_Var.Rivet2ingOK.ToString();
            CommonMethods.CurrentValue["_03_HMI.Rivet2ingNOK"] = HMI_Var.Rivet2ingNOK.ToString();
            CommonMethods.CurrentValue["_03_HMI.Rivet2ingOK_SpeedJudgment"] = HMI_Var.Rivet2ingOK_SpeedJudgment.ToString();
            CommonMethods.CurrentValue["_03_HMI.Rivet2ingOK_PositionVariationJudgment"] = HMI_Var.Rivet2ingOK_PositionVariationJudgment.ToString();
            CommonMethods.CurrentValue["_03_HMI.Rivet2ingOK_TorqueJudgment"] = HMI_Var.Rivet2ingOK_TorqueJudgment.ToString();
            CommonMethods.CurrentValue["_03_HMI.Rivet2ingOK_PositionJudgment"] = HMI_Var.Rivet2ingOK_PositionJudgment.ToString();
            CommonMethods.CurrentValue["_03_HMI.Rivet2ingNOK_OverTime"] = HMI_Var.Rivet2ingNOK_OverTime.ToString();
            CommonMethods.CurrentValue["_03_HMI.Rivet2ingNOK_OverSpeed"] = HMI_Var.Rivet2ingNOK_OverSpeed.ToString();
            CommonMethods.CurrentValue["_03_HMI.Rivet2ingNOK_OverPosition"] = HMI_Var.Rivet2ingNOK_OverPosition.ToString();
            CommonMethods.CurrentValue["_03_HMI.Rivet2ingTime"] = HMI_Var.Rivet2ingTime.ToString();
            CommonMethods.CurrentValue["_03_HMI.Rivet2OKPositionRecord"] = HMI_Var.Rivet2OKPositionRecord.ToString();
            CommonMethods.CurrentValue["_03_HMI.Rivet2Force"] = HMI_Var.Rivet2Force.ToString();
            CommonMethods.CurrentValue["_03_HMI.Rivet2ForceP"] = HMI_Var.Rivet2ForceP.ToString();
            CommonMethods.CurrentValue["_03_HMI.Rivet2ForceI"] = HMI_Var.Rivet2ForceI.ToString();
            CommonMethods.CurrentValue["_03_HMI.Rivet2RotationalSpeed"] = HMI_Var.Rivet2RotationalSpeed.ToString();
            CommonMethods.CurrentValue["_03_HMI.Rivet2RotationalACCTime"] = HMI_Var.Rivet2RotationalACCTime.ToString();
            CommonMethods.CurrentValue["_03_HMI.Rivet2RotationalDECTime"] = HMI_Var.Rivet2RotationalDECTime.ToString();
            CommonMethods.CurrentValue["_03_HMI.Rivet2OKUpPosition"] = HMI_Var.Rivet2OKUpPosition.ToString();
            CommonMethods.CurrentValue["_03_HMI.Rivet2OKDownPosition"] = HMI_Var.Rivet2OKDownPosition.ToString();
            CommonMethods.CurrentValue["_03_HMI.Rivet2OKSpeedJudgment"] = HMI_Var.Rivet2OKSpeedJudgment.ToString();
            CommonMethods.CurrentValue["_03_HMI.Rivet2OKSpeed"] = HMI_Var.Rivet2OKSpeed.ToString();
            CommonMethods.CurrentValue["_03_HMI.Rivet2OKPositionVariationJudgment"] = HMI_Var.Rivet2OKPositionVariationJudgment.ToString();
            CommonMethods.CurrentValue["_03_HMI.Rivet2OKPositionVariation"] = HMI_Var.Rivet2OKPositionVariation.ToString();
            CommonMethods.CurrentValue["_03_HMI.Rivet2OKPositionVariationSamplintTime"] = HMI_Var.Rivet2OKPositionVariationSamplintTime.ToString();
            CommonMethods.CurrentValue["_03_HMI.Rivet2OKTorqueJudgment"] = HMI_Var.Rivet2OKTorqueJudgment.ToString();
            CommonMethods.CurrentValue["_03_HMI.Rivet2OKTorque"] = HMI_Var.Rivet2OKTorque.ToString();
            CommonMethods.CurrentValue["_03_HMI.Rivet2OKPositionJudgment"] = HMI_Var.Rivet2OKPositionJudgment.ToString();
            CommonMethods.CurrentValue["_03_HMI.Rivet2OKPosition"] = HMI_Var.Rivet2OKPosition.ToString();
            CommonMethods.CurrentValue["_03_HMI.Rivet2MaxSpeed"] = HMI_Var.Rivet2MaxSpeed.ToString();
            CommonMethods.CurrentValue["_03_HMI.Rivet2OverTime"] = HMI_Var.Rivet2OverTime.ToString();
            CommonMethods.CurrentValue["_03_HMI.Rivet3ing"] = HMI_Var.Rivet3ing.ToString();
            CommonMethods.CurrentValue["_03_HMI.Rivet3ingStop"] = HMI_Var.Rivet3ingStop.ToString();
            CommonMethods.CurrentValue["_03_HMI.Rivet3ingOK"] = HMI_Var.Rivet3ingOK.ToString();
            CommonMethods.CurrentValue["_03_HMI.Rivet3ingNOK"] = HMI_Var.Rivet3ingNOK.ToString();
            CommonMethods.CurrentValue["_03_HMI.Rivet3ingOK_SpeedJudgment"] = HMI_Var.Rivet3ingOK_SpeedJudgment.ToString();
            CommonMethods.CurrentValue["_03_HMI.Rivet3ingOK_PositionVariationJudgment"] = HMI_Var.Rivet3ingOK_PositionVariationJudgment.ToString();
            CommonMethods.CurrentValue["_03_HMI.Rivet3ingOK_TorqueJudgment"] = HMI_Var.Rivet3ingOK_TorqueJudgment.ToString();
            CommonMethods.CurrentValue["_03_HMI.Rivet3ingOK_PositionJudgment"] = HMI_Var.Rivet3ingOK_PositionJudgment.ToString();
            CommonMethods.CurrentValue["_03_HMI.Rivet3ingNOK_OverTime"] = HMI_Var.Rivet3ingNOK_OverTime.ToString();
            CommonMethods.CurrentValue["_03_HMI.Rivet3ingNOK_OverSpeed"] = HMI_Var.Rivet3ingNOK_OverSpeed.ToString();
            CommonMethods.CurrentValue["_03_HMI.Rivet3ingNOK_OverPosition"] = HMI_Var.Rivet3ingNOK_OverPosition.ToString();
            CommonMethods.CurrentValue["_03_HMI.Rivet3ingTime"] = HMI_Var.Rivet3ingTime.ToString();
            CommonMethods.CurrentValue["_03_HMI.Rivet3OKPositionRecord"] = HMI_Var.Rivet3OKPositionRecord.ToString();
            CommonMethods.CurrentValue["_03_HMI.Rivet3Force"] = HMI_Var.Rivet3Force.ToString();
            CommonMethods.CurrentValue["_03_HMI.Rivet3ForceP"] = HMI_Var.Rivet3ForceP.ToString();
            CommonMethods.CurrentValue["_03_HMI.Rivet3ForceI"] = HMI_Var.Rivet3ForceI.ToString();
            CommonMethods.CurrentValue["_03_HMI.Rivet3RotationalSpeed"] = HMI_Var.Rivet3RotationalSpeed.ToString();
            CommonMethods.CurrentValue["_03_HMI.Rivet3RotationalACCTime"] = HMI_Var.Rivet3RotationalACCTime.ToString();
            CommonMethods.CurrentValue["_03_HMI.Rivet3RotationalDECTime"] = HMI_Var.Rivet3RotationalDECTime.ToString();
            CommonMethods.CurrentValue["_03_HMI.Rivet3OKUpPosition"] = HMI_Var.Rivet3OKUpPosition.ToString();
            CommonMethods.CurrentValue["_03_HMI.Rivet3OKDownPosition"] = HMI_Var.Rivet3OKDownPosition.ToString();
            CommonMethods.CurrentValue["_03_HMI.Rivet3OKSpeedJudgment"] = HMI_Var.Rivet3OKSpeedJudgment.ToString();
            CommonMethods.CurrentValue["_03_HMI.Rivet3OKSpeed"] = HMI_Var.Rivet3OKSpeed.ToString();
            CommonMethods.CurrentValue["_03_HMI.Rivet3OKPositionVariationJudgment"] = HMI_Var.Rivet3OKPositionVariationJudgment.ToString();
            CommonMethods.CurrentValue["_03_HMI.Rivet3OKPositionVariation"] = HMI_Var.Rivet3OKPositionVariation.ToString();
            CommonMethods.CurrentValue["_03_HMI.Rivet3OKPositionVariationSamplintTime"] = HMI_Var.Rivet3OKPositionVariationSamplintTime.ToString();
            CommonMethods.CurrentValue["_03_HMI.Rivet3OKTorqueJudgment"] = HMI_Var.Rivet3OKTorqueJudgment.ToString();
            CommonMethods.CurrentValue["_03_HMI.Rivet3OKTorque"] = HMI_Var.Rivet3OKTorque.ToString();
            CommonMethods.CurrentValue["_03_HMI.Rivet3OKPositionJudgment"] = HMI_Var.Rivet3OKPositionJudgment.ToString();
            CommonMethods.CurrentValue["_03_HMI.Rivet3OKPosition"] = HMI_Var.Rivet3OKPosition.ToString();
            CommonMethods.CurrentValue["_03_HMI.Rivet3MaxSpeed"] = HMI_Var.Rivet3MaxSpeed.ToString();
            CommonMethods.CurrentValue["_03_HMI.Rivet3OverTime"] = HMI_Var.Rivet3OverTime.ToString();




            CommonMethods.CurrentValue["Main_Sys.MEmgStop"] = HMI_Var.MEmgStop.ToString();
            CommonMethods.CurrentValue["Main_Sys.Exc_EmgStop"] = HMI_Var.Exc_EmgStop.ToString();
            CommonMethods.CurrentValue["_02_InOutput.biSwEmgStop"] = HMI_Var.biSwEmgStop.ToString();
            CommonMethods.CurrentValue["_02_InOutput.biEbEmgStop"] = HMI_Var.biEbEmgStop.ToString();
            CommonMethods.CurrentValue["_02_InOutput.biContactor1"] = HMI_Var.biContactor1.ToString();
            CommonMethods.CurrentValue["_02_InOutput.biContactor2"] = HMI_Var.biContactor2.ToString();
            CommonMethods.CurrentValue["_02_InOutput.biAxis1Ready"] = HMI_Var.biAxis1Ready.ToString();
            CommonMethods.CurrentValue["_02_InOutput.biAxis2Ready"] = HMI_Var.biAxis2Ready.ToString();
            CommonMethods.CurrentValue["_02_InOutput.biBtRun"] = HMI_Var.biBtRun.ToString();
            CommonMethods.CurrentValue["_02_InOutput.biBtReset"] = HMI_Var.biBtReset.ToString();
            CommonMethods.CurrentValue["_02_InOutput.biTotaInAirPresRch1"] = HMI_Var.biTotaInAirPresRch1.ToString();
            CommonMethods.CurrentValue["_02_InOutput.biTotaInAirPresRch2"] = HMI_Var.biTotaInAirPresRch2.ToString();

            CommonMethods.CurrentValue["_03_HMI.RefFeedMachPushRivetValve"] = HMI_Var.RefFeedMachPushRivetValve.ToString();
            CommonMethods.CurrentValue["_03_HMI.RefFeedMachBlowRivetValve"] = HMI_Var.RefFeedMachBlowRivetValve.ToString();
            CommonMethods.CurrentValue["_03_HMI.RefClampValve"] = HMI_Var.RefClampValve.ToString();
            CommonMethods.CurrentValue["_03_HMI.RefCachePlacePushRivetValve"] = HMI_Var.RefCachePlacePushRivetValve.ToString();
            CommonMethods.CurrentValue["_03_HMI.RefCachePlaceBlowRivetValve"] = HMI_Var.RefCachePlaceBlowRivetValve.ToString();
            CommonMethods.CurrentValue["_03_HMI.RefEnableVacuoValve"] = HMI_Var.RefEnableVacuoValve.ToString();
            CommonMethods.CurrentValue["_03_HMI.RefDisableVacuoValve"] = HMI_Var.RefDisableVacuoValve.ToString();
            CommonMethods.CurrentValue["_03_HMI.RefGunHeadBlowRivetValve"] = HMI_Var.RefGunHeadBlowRivetValve.ToString();
            CommonMethods.CurrentValue["_03_HMI.RefPrePressureExtendValve"] = HMI_Var.RefPrePressureExtendValve.ToString();
            CommonMethods.CurrentValue["_03_HMI.RefPrePressureRetractValve"] = HMI_Var.RefPrePressureRetractValve.ToString();







            CommonMethods.CurrentValue["_02_InOutput.biVacuoValueRch1"] = HMI_Var.biVacuoValueRch1.ToString();
            CommonMethods.CurrentValue["_03_HMI.btManualInhaleRivet"] = HMI_Var.btManualInhaleRivet.ToString();
            CommonMethods.CurrentValue["_03_HMI.RefVacuoValve_Manual"] = HMI_Var.RefVacuoValve_Manual.ToString();
            CommonMethods.CurrentValue["_03_HMI.btManualFeed"] = HMI_Var.btManualFeed.ToString();
            CommonMethods.CurrentValue["_03_HMI.btManualPrePress"] = HMI_Var.btManualPrePress.ToString();
            CommonMethods.CurrentValue["_03_HMI.btManualRivet"] = HMI_Var.btManualRivet.ToString();









            CommonMethods.CurrentValue["Enabled1"] = HMI_Var.Enabled1.ToString();
            CommonMethods.CurrentValue["Enabled2"] = HMI_Var.Enabled2.ToString();
            CommonMethods.CurrentValue["Error1"] = HMI_Var.Error1.ToString();
            CommonMethods.CurrentValue["Error2"] = HMI_Var.Error2.ToString();
            CommonMethods.CurrentValue["SysManualMode"] = HMI_Var.SysManualMode.ToString();
            CommonMethods.CurrentValue["SysAutoMode"] = HMI_Var.SysAutoMode.ToString();
            CommonMethods.CurrentValue["SysDebugMode"] = HMI_Var.SysDebugMode.ToString();
            CommonMethods.CurrentValue["SysExcMode"] = HMI_Var.SysExcMode.ToString();
            CommonMethods.CurrentValue["SysAlarmActive"] = HMI_Var.SysAlarmActive.ToString();
            CommonMethods.CurrentValue["ErrDoorOpen"] = HMI_Var.ErrDoorOpen.ToString();
            CommonMethods.CurrentValue["SysNotEmgStop"] = HMI_Var.SysNotEmgStop.ToString();
            CommonMethods.CurrentValue["Feeding"] = HMI_Var.Feeding.ToString();
            CommonMethods.CurrentValue["PrePressing"] = HMI_Var.PrePressing.ToString();
            CommonMethods.CurrentValue["Riveting"] = HMI_Var.Riveting.ToString();
            CommonMethods.CurrentValue["FeedingStop"] = HMI_Var.FeedingStop.ToString();
            CommonMethods.CurrentValue["PrePressingStop"] = HMI_Var.PrePressingStop.ToString();
            CommonMethods.CurrentValue["RivetingStop"] = HMI_Var.RivetingStop.ToString();
            CommonMethods.CurrentValue["FeedingOK"] = HMI_Var.FeedingOK.ToString();
            CommonMethods.CurrentValue["PrePressingOK"] = HMI_Var.PrePressingOK.ToString();
            CommonMethods.CurrentValue["RivetingOK"] = HMI_Var.RivetingOK.ToString();
            CommonMethods.CurrentValue["FeedingNOK"] = HMI_Var.FeedingNOK.ToString();
            CommonMethods.CurrentValue["PrePressingNOK"] = HMI_Var.PrePressingNOK.ToString();
            CommonMethods.CurrentValue["RivetingNOK"] = HMI_Var.RivetingNOK.ToString();
            CommonMethods.CurrentValue["FeedMachRivetOK"] = HMI_Var.FeedMachRivetOK.ToString();
            CommonMethods.CurrentValue["FeedMachPushRivetBasic"] = HMI_Var.FeedMachPushRivetBasic.ToString();
            CommonMethods.CurrentValue["FeedMachPushRivetWork"] = HMI_Var.FeedMachPushRivetWork.ToString();
            CommonMethods.CurrentValue["FeedMachRivetOut"] = HMI_Var.FeedMachRivetOut.ToString();
            CommonMethods.CurrentValue["btDebug"] = HMI_Var.btDebug.ToString();
            CommonMethods.CurrentValue["btEnableVacuoValve"] = HMI_Var.btEnableVacuoValve.ToString();
            CommonMethods.CurrentValue["btDisableVacuoValve"] = HMI_Var.btDisableVacuoValve.ToString();
            CommonMethods.CurrentValue["btPrePressureExtendValve"] = HMI_Var.btPrePressureExtendValve.ToString();
            CommonMethods.CurrentValue["btPrePressureRetractValve"] = HMI_Var.btPrePressureRetractValve.ToString();
            CommonMethods.CurrentValue["btCachePlacePushRivetValve"] = HMI_Var.btCachePlacePushRivetValve.ToString();
            CommonMethods.CurrentValue["btClampValve"] = HMI_Var.btClampValve.ToString();
            CommonMethods.CurrentValue["btCachePlaceBlowRivetValve"] = HMI_Var.btCachePlaceBlowRivetValve.ToString();
            CommonMethods.CurrentValue["btGunHeadBlowRivetValve"] = HMI_Var.btGunHeadBlowRivetValve.ToString();
            CommonMethods.CurrentValue["btManualJogF1"] = HMI_Var.btManualJogF1.ToString();
            CommonMethods.CurrentValue["btManualJogB1"] = HMI_Var.btManualJogB1.ToString();
            CommonMethods.CurrentValue["btManualPower1"] = HMI_Var.btManualPower1.ToString();
            CommonMethods.CurrentValue["btReset1"] = HMI_Var.btReset1.ToString();
            CommonMethods.CurrentValue["btFeedMachPushRivetValve"] = HMI_Var.btFeedMachPushRivetValve.ToString();
            CommonMethods.CurrentValue["btFeedMachBlowRivetValve"] = HMI_Var.btFeedMachBlowRivetValve.ToString();
            CommonMethods.CurrentValue["btFeedMachRivetOutCounterClean"] = HMI_Var.btFeedMachRivetOutCounterClean.ToString();
            CommonMethods.CurrentValue["btFeedingTestStart_Stop"] = HMI_Var.btFeedingTestStart_Stop.ToString();
            CommonMethods.CurrentValue["btCachePlaceRivetInCounterClean"] = HMI_Var.btCachePlaceRivetInCounterClean.ToString();
            CommonMethods.CurrentValue["btCachePlaceRivetOutCounterClean"] = HMI_Var.btCachePlaceRivetOutCounterClean.ToString();
            CommonMethods.CurrentValue["btGunHeadRivetInCounterClean"] = HMI_Var.btGunHeadRivetInCounterClean.ToString();
            CommonMethods.CurrentValue["btInhaleRivetOKCounterClean"] = HMI_Var.btInhaleRivetOKCounterClean.ToString();
            CommonMethods.CurrentValue["status1"] = HMI_Var.status1.ToString();
            CommonMethods.CurrentValue["status2"] = HMI_Var.status2.ToString();
            CommonMethods.CurrentValue["status3"] = HMI_Var.status3.ToString();
            CommonMethods.CurrentValue["status4"] = HMI_Var.status4.ToString();
            CommonMethods.CurrentValue["status5"] = HMI_Var.status5.ToString();
            CommonMethods.CurrentValue["status6"] = HMI_Var.status6.ToString();
            CommonMethods.CurrentValue["status7"] = HMI_Var.status7.ToString();
            CommonMethods.CurrentValue["status8"] = HMI_Var.status8.ToString();
            CommonMethods.CurrentValue["CachePlaceRivetIn"] = HMI_Var.CachePlaceRivetIn.ToString();
            CommonMethods.CurrentValue["btFeedMachLastCycleCounterClean"] = HMI_Var.btFeedMachLastCycleCounterClean.ToString();
            CommonMethods.CurrentValue["btFeedMachNowCycleCounterClean"] = HMI_Var.btFeedMachNowCycleCounterClean.ToString();
            CommonMethods.CurrentValue["btGunLastCycleCounterClean"] = HMI_Var.btGunLastCycleCounterClean.ToString();
            CommonMethods.CurrentValue["btGunNowCycleCounterClean"] = HMI_Var.btGunNowCycleCounterClean.ToString();
            CommonMethods.CurrentValue["btInhaleRivetNOKCounterClean"] = HMI_Var.btInhaleRivetNOKCounterClean.ToString();
            CommonMethods.CurrentValue["btInhaleRivetActualCounterClean"] = HMI_Var.btInhaleRivetActualCounterClean.ToString();
            CommonMethods.CurrentValue["FeedMachNowCycleing"] = HMI_Var.FeedMachNowCycleing.ToString();
            CommonMethods.CurrentValue["GunNowCycleing"] = HMI_Var.GunNowCycleing.ToString();
            CommonMethods.CurrentValue["CachePlaceRivetAt"] = HMI_Var.CachePlaceRivetAt.ToString();
            CommonMethods.CurrentValue["FeedMachRivetOutOverTimeAlarm"] = HMI_Var.FeedMachRivetOutOverTimeAlarm.ToString();
            CommonMethods.CurrentValue["FeedMachRivetOutOverTimeReset"] = HMI_Var.FeedMachRivetOutOverTimeReset.ToString();
            CommonMethods.CurrentValue["CachePlaceRivetInOverTimeAlarm"] = HMI_Var.CachePlaceRivetInOverTimeAlarm.ToString();
            CommonMethods.CurrentValue["CachePlaceRivetInOverTimeReset"] = HMI_Var.CachePlaceRivetInOverTimeReset.ToString();
            CommonMethods.CurrentValue["CachePlaceRivetAtOverTimeAlarm"] = HMI_Var.CachePlaceRivetAtOverTimeAlarm.ToString();
            CommonMethods.CurrentValue["CachePlaceRivetAtOverTimeReset"] = HMI_Var.CachePlaceRivetAtOverTimeReset.ToString();
            CommonMethods.CurrentValue["FeedMachBlowRivetOverTimeAlarm"] = HMI_Var.FeedMachBlowRivetOverTimeAlarm.ToString();
            CommonMethods.CurrentValue["FeedMachBlowRivetOverTimeReset"] = HMI_Var.FeedMachBlowRivetOverTimeReset.ToString();
            CommonMethods.CurrentValue["CachePlaceRivetOutOverTimeAlarm"] = HMI_Var.CachePlaceRivetOutOverTimeAlarm.ToString();
            CommonMethods.CurrentValue["CachePlaceRivetOutOverTimeReset"] = HMI_Var.CachePlaceRivetOutOverTimeReset.ToString();
            CommonMethods.CurrentValue["GunHeadRivetInOverTimeAlarm"] = HMI_Var.GunHeadRivetInOverTimeAlarm.ToString();
            CommonMethods.CurrentValue["GunHeadRivetInOverTimeReset"] = HMI_Var.GunHeadRivetInOverTimeReset.ToString();
            CommonMethods.CurrentValue["CachePlaceBlowRivetOverTimeAlarm"] = HMI_Var.CachePlaceBlowRivetOverTimeAlarm.ToString();
            CommonMethods.CurrentValue["CachePlaceBlowRivetOverTimeReset"] = HMI_Var.CachePlaceBlowRivetOverTimeReset.ToString();
            CommonMethods.CurrentValue["FeedingNOKLater_CycleContinue"] = HMI_Var.FeedingNOKLater_CycleContinue.ToString();
            CommonMethods.CurrentValue["InhaleRivetLater_DisableVacuoAlarm"] = HMI_Var.InhaleRivetLater_DisableVacuoAlarm.ToString();
            CommonMethods.CurrentValue["InhaleRivetLater_DisableVacuoReset"] = HMI_Var.InhaleRivetLater_DisableVacuoReset.ToString();
            CommonMethods.CurrentValue["btDay_Night"] = HMI_Var.btDay_Night.ToString();
            CommonMethods.CurrentValue["PrePressureWork1"] = HMI_Var.PrePressureWork1.ToString();
            CommonMethods.CurrentValue["PrePressureBasic1"] = HMI_Var.PrePressureBasic1.ToString();
            CommonMethods.CurrentValue["PrePressureWork2"] = HMI_Var.PrePressureWork2.ToString();
            CommonMethods.CurrentValue["PrePressureBasic2"] = HMI_Var.PrePressureBasic2.ToString();
            CommonMethods.CurrentValue["CachePlacePushRivetWork"] = HMI_Var.CachePlacePushRivetWork.ToString();
            CommonMethods.CurrentValue["CachePlacePushRivetBasic"] = HMI_Var.CachePlacePushRivetBasic.ToString();
            CommonMethods.CurrentValue["ClampWork"] = HMI_Var.ClampWork.ToString();
            CommonMethods.CurrentValue["ClampBasic"] = HMI_Var.ClampBasic.ToString();
            CommonMethods.CurrentValue["CachePlaceRivetOut"] = HMI_Var.CachePlaceRivetOut.ToString();
            CommonMethods.CurrentValue["GunHeadRivetIn"] = HMI_Var.GunHeadRivetIn.ToString();
            CommonMethods.CurrentValue["LimitSwitchUp"] = HMI_Var.LimitSwitchUp.ToString();
            CommonMethods.CurrentValue["LimitSwitchOrigin"] = HMI_Var.LimitSwitchOrigin.ToString();
            CommonMethods.CurrentValue["LimitSwitchDown"] = HMI_Var.LimitSwitchDown.ToString();
            CommonMethods.CurrentValue["VacuoValueRch1"] = HMI_Var.VacuoValueRch1.ToString();
            CommonMethods.CurrentValue["btMotorDebug"] = HMI_Var.btMotorDebug.ToString();
            CommonMethods.CurrentValue["btFeedTest"] = HMI_Var.btFeedTest.ToString();
            CommonMethods.CurrentValue["SysStep"] = HMI_Var.SysStep.ToString();
            CommonMethods.CurrentValue["ManualStep"] = HMI_Var.ManualStep.ToString();
            CommonMethods.CurrentValue["AutoStep"] = HMI_Var.AutoStep.ToString();
            CommonMethods.CurrentValue["DebugStep"] = HMI_Var.DebugStep.ToString();
            CommonMethods.CurrentValue["ExcStep"] = HMI_Var.ExcStep.ToString();
            CommonMethods.CurrentValue["Timer"] = HMI_Var.Timer.ToString();
            CommonMethods.CurrentValue["FeedingTime"] = HMI_Var.FeedingTime.ToString();
            CommonMethods.CurrentValue["PrePressingTime"] = HMI_Var.PrePressingTime.ToString();
            CommonMethods.CurrentValue["RivetingTime"] = HMI_Var.RivetingTime.ToString();
            CommonMethods.CurrentValue["MaxFeedingTime"] = HMI_Var.MaxFeedingTime.ToString();
            CommonMethods.CurrentValue["MaxPrePressingTime"] = HMI_Var.MaxPrePressingTime.ToString();
            CommonMethods.CurrentValue["MaxRivetingTime"] = HMI_Var.MaxRivetingTime.ToString();
            CommonMethods.CurrentValue["MultistageId"] = HMI_Var.MultistageId.ToString();
            CommonMethods.CurrentValue["TestFeedingTime"] = HMI_Var.TestFeedingTime.ToString();
            CommonMethods.CurrentValue["EnableVacuoValve_VacuoRchTime"] = HMI_Var.EnableVacuoValve_VacuoRchTime.ToString();
            CommonMethods.CurrentValue["VacuoRchLater_SampleTime"] = HMI_Var.VacuoRchLater_SampleTime.ToString();
            CommonMethods.CurrentValue["EnableVacuoValveLater_SampleTime1"] = HMI_Var.EnableVacuoValveLater_SampleTime1.ToString();
            CommonMethods.CurrentValue["EnableVacuoValveLater_SampleTime2"] = HMI_Var.EnableVacuoValveLater_SampleTime2.ToString();
            CommonMethods.CurrentValue["FeedMachRivetOutOverTime"] = HMI_Var.FeedMachRivetOutOverTime.ToString();
            CommonMethods.CurrentValue["CachePlaceRivetInOverTime"] = HMI_Var.CachePlaceRivetInOverTime.ToString();
            CommonMethods.CurrentValue["CachePlaceRivetAtOverTime"] = HMI_Var.CachePlaceRivetAtOverTime.ToString();
            CommonMethods.CurrentValue["CachePlaceRivetAtHeartbeatTime"] = HMI_Var.CachePlaceRivetAtHeartbeatTime.ToString();
            CommonMethods.CurrentValue["CachePlaceRivetOutOverTime"] = HMI_Var.CachePlaceRivetOutOverTime.ToString();
            CommonMethods.CurrentValue["GunHeadRivetInOverTime"] = HMI_Var.GunHeadRivetInOverTime.ToString();
            CommonMethods.CurrentValue["GunHeadRivetIn_EnableVacuoValveDelayTime"] = HMI_Var.GunHeadRivetIn_EnableVacuoValveDelayTime.ToString();
            CommonMethods.CurrentValue["FeedTest_InhaleRivetMaxTime"] = HMI_Var.FeedTest_InhaleRivetMaxTime.ToString();
            CommonMethods.CurrentValue["FeedTest_InhaleRivetIntervalTime"] = HMI_Var.FeedTest_InhaleRivetIntervalTime.ToString();
            CommonMethods.CurrentValue["FeedMachModel"] = HMI_Var.FeedMachModel.ToString();
            CommonMethods.CurrentValue["FeedMachRivetOutCounter"] = HMI_Var.FeedMachRivetOutCounter.ToString();
            CommonMethods.CurrentValue["CachePlaceRivetInCounter"] = HMI_Var.CachePlaceRivetInCounter.ToString();
            CommonMethods.CurrentValue["InhaleRivetOKCounter"] = HMI_Var.InhaleRivetOKCounter.ToString();
            CommonMethods.CurrentValue["FeedTest_InhaleRivetMaxCounter"] = HMI_Var.FeedTest_InhaleRivetMaxCounter.ToString();
            CommonMethods.CurrentValue["FeedMachLastCycleCounter"] = HMI_Var.FeedMachLastCycleCounter.ToString();
            CommonMethods.CurrentValue["FeedMachNowCycleCounter"] = HMI_Var.FeedMachNowCycleCounter.ToString();
            CommonMethods.CurrentValue["GunLastCycleCounter"] = HMI_Var.GunLastCycleCounter.ToString();
            CommonMethods.CurrentValue["GunNowCycleCounter"] = HMI_Var.GunNowCycleCounter.ToString();
            CommonMethods.CurrentValue["InhaleRivetNOKCounter"] = HMI_Var.InhaleRivetNOKCounter.ToString();
            CommonMethods.CurrentValue["InhaleRivetActualCounter"] = HMI_Var.InhaleRivetActualCounter.ToString();
            CommonMethods.CurrentValue["RivetInCounter"] = HMI_Var.RivetInCounter.ToString();
            CommonMethods.CurrentValue["RivetOutCounter"] = HMI_Var.RivetOutCounter.ToString();
            CommonMethods.CurrentValue["JogVelocity1"] = HMI_Var.JogVelocity1.ToString();
            CommonMethods.CurrentValue["MaxPressure"] = HMI_Var.MaxPressure.ToString();
            CommonMethods.CurrentValue["MaxTorque"] = HMI_Var.MaxTorque.ToString();
            CommonMethods.CurrentValue["FeedPos1"] = HMI_Var.FeedPos1.ToString();
            CommonMethods.CurrentValue["VacuoValue1"] = HMI_Var.VacuoValue1.ToString();
            CommonMethods.CurrentValue["SingleCycleVacuoValue"] = HMI_Var.SingleCycleVacuoValue.ToString();
            CommonMethods.CurrentValue["PrePressureSetValue"] = HMI_Var.PrePressureSetValue.ToString();
            CommonMethods.CurrentValue["PrePressureRefValue"] = HMI_Var.PrePressureRefValue.ToString();
            CommonMethods.CurrentValue["DataPressure"] = HMI_Var.DataPressure.ToString();
            CommonMethods.CurrentValue["DataTorque"] = HMI_Var.DataTorque.ToString();
            CommonMethods.CurrentValue["ActVelo2"] = HMI_Var.ActVelo2.ToString();
            CommonMethods.CurrentValue["ActVelo1"] = HMI_Var.ActVelo1.ToString();
            CommonMethods.CurrentValue["ActPos2"] = HMI_Var.ActPos2.ToString();
            CommonMethods.CurrentValue["EnableVacuoValveLater_VacuoValue1"] = HMI_Var.EnableVacuoValveLater_VacuoValue1.ToString();
            CommonMethods.CurrentValue["EnableVacuoValveLater_VacuoValue2"] = HMI_Var.EnableVacuoValveLater_VacuoValue2.ToString();
            CommonMethods.CurrentValue["FeedTest_Velo1"] = HMI_Var.FeedTest_Velo1.ToString();
            CommonMethods.CurrentValue["FeedTest_Acc1"] = HMI_Var.FeedTest_Acc1.ToString();
            CommonMethods.CurrentValue["FeedTest_Dec1"] = HMI_Var.FeedTest_Dec1.ToString();
            CommonMethods.CurrentValue["FeedTest_Jerk1"] = HMI_Var.FeedTest_Jerk1.ToString();
            CommonMethods.CurrentValue["FeedTest_Velo2"] = HMI_Var.FeedTest_Velo2.ToString();
            CommonMethods.CurrentValue["FeedTest_Acc2"] = HMI_Var.FeedTest_Acc2.ToString();
            CommonMethods.CurrentValue["FeedTest_Dec2"] = HMI_Var.FeedTest_Dec2.ToString();
            CommonMethods.CurrentValue["FeedTest_Jerk2"] = HMI_Var.FeedTest_Jerk2.ToString();
            CommonMethods.CurrentValue["FeedTest_InhaleRivetTargetPos"] = HMI_Var.FeedTest_InhaleRivetTargetPos.ToString();




            CommonMethods.CurrentValue["RefFeedMachPushRivetValve"] = HMI_Var.RefFeedMachPushRivetValve.ToString();
            CommonMethods.CurrentValue["RefFeedMachBlowRivetValve"] = HMI_Var.RefFeedMachBlowRivetValve.ToString();
            CommonMethods.CurrentValue["RefClampValve"] = HMI_Var.RefClampValve.ToString();
            CommonMethods.CurrentValue["RefCachePlacePushRivetValve"] = HMI_Var.RefCachePlacePushRivetValve.ToString();
            CommonMethods.CurrentValue["RefCachePlaceBlowRivetValve"] = HMI_Var.RefCachePlaceBlowRivetValve.ToString();
            CommonMethods.CurrentValue["RefEnableVacuoValve"] = HMI_Var.RefEnableVacuoValve.ToString();
            CommonMethods.CurrentValue["RefDisableVacuoValve"] = HMI_Var.RefDisableVacuoValve.ToString();
            CommonMethods.CurrentValue["RefGunHeadBlowRivetValve"] = HMI_Var.RefGunHeadBlowRivetValve.ToString();
            CommonMethods.CurrentValue["RefPrePressureExtendValve"] = HMI_Var.RefPrePressureExtendValve.ToString();
            CommonMethods.CurrentValue["RefPrePressureRetractValve"] = HMI_Var.RefPrePressureRetractValve.ToString();




            //CommonMethods.CurrentValue["biVacuoValueRch1"] = HMI_Var.biVacuoValueRch1.ToString();
            //CommonMethods.CurrentValue["btManualInhaleRivet"] = HMI_Var.btManualInhaleRivet.ToString();
            //CommonMethods.CurrentValue["RefVacuoValve_Manual"] = HMI_Var.RefVacuoValve_Manual.ToString();
            //CommonMethods.CurrentValue["btManualFeed"] = HMI_Var.btManualFeed.ToString();
            //CommonMethods.CurrentValue["btManualPrePress"] = HMI_Var.btManualPrePress.ToString();
            //CommonMethods.CurrentValue["btManualRivet"] = HMI_Var.btManualRivet.ToString();





            ///CommonMethods.CurrentValue["RefFeedMachPushRivetValve"].

            //CommonMethods.CurrentValue["Enabled1"] = CommonMethods.CurrentValue["_03_HMI.Enabled1"].ToString();
            //CommonMethods.CurrentValue["Enabled2"] = CommonMethods.CurrentValue["_03_HMI.Enabled2"].ToString();
            //CommonMethods.CurrentValue["Error1"] = CommonMethods.CurrentValue["_03_HMI.Error1"].ToString();
            //CommonMethods.CurrentValue["Error2"] = CommonMethods.CurrentValue["_03_HMI.Error2"].ToString();
            //CommonMethods.CurrentValue["SysManualMode"] = CommonMethods.CurrentValue["_03_HMI.SysManualMode"].ToString();
            //CommonMethods.CurrentValue["SysAutoMode"] = CommonMethods.CurrentValue["_03_HMI.SysAutoMode"].ToString();
            //CommonMethods.CurrentValue["SysDebugMode"] = CommonMethods.CurrentValue["_03_HMI.SysDebugMode"].ToString();
            //CommonMethods.CurrentValue["SysExcMode"] = CommonMethods.CurrentValue["_03_HMI.SysExcMode"].ToString();
            //CommonMethods.CurrentValue["SysAlarmActive"] = CommonMethods.CurrentValue["_03_HMI.SysAlarmActive"].ToString();
            //CommonMethods.CurrentValue["ErrDoorOpen"] = CommonMethods.CurrentValue["_03_HMI.ErrDoorOpen"].ToString();
            //CommonMethods.CurrentValue["SysNotEmgStop"] = CommonMethods.CurrentValue["_03_HMI.SysNotEmgStop"].ToString();
            //CommonMethods.CurrentValue["Feeding"] = CommonMethods.CurrentValue["_03_HMI.Feeding"].ToString();
            //CommonMethods.CurrentValue["PrePressing"] = CommonMethods.CurrentValue["_03_HMI.PrePressing"].ToString();
            //CommonMethods.CurrentValue["Riveting"] = CommonMethods.CurrentValue["_03_HMI.Riveting"].ToString();
            //CommonMethods.CurrentValue["FeedingStop"] = CommonMethods.CurrentValue["_03_HMI.FeedingStop"].ToString();
            //CommonMethods.CurrentValue["PrePressingStop"] = CommonMethods.CurrentValue["_03_HMI.PrePressingStop"].ToString();
            //CommonMethods.CurrentValue["RivetingStop"] = CommonMethods.CurrentValue["_03_HMI.RivetingStop"].ToString();
            //CommonMethods.CurrentValue["FeedingOK"] = CommonMethods.CurrentValue["_03_HMI.FeedingOK"].ToString();
            //CommonMethods.CurrentValue["PrePressingOK"] = CommonMethods.CurrentValue["_03_HMI.PrePressingOK"].ToString();
            //CommonMethods.CurrentValue["RivetingOK"] = CommonMethods.CurrentValue["_03_HMI.RivetingOK"].ToString();
            //CommonMethods.CurrentValue["FeedingNOK"] = CommonMethods.CurrentValue["_03_HMI.FeedingNOK"].ToString();
            //CommonMethods.CurrentValue["PrePressingNOK"] = CommonMethods.CurrentValue["_03_HMI.PrePressingNOK"].ToString();
            //CommonMethods.CurrentValue["RivetingNOK"] = CommonMethods.CurrentValue["_03_HMI.RivetingNOK"].ToString();
            //CommonMethods.CurrentValue["FeedMachRivetOK"] = CommonMethods.CurrentValue["_03_HMI.FeedMachRivetOK"].ToString();
            //CommonMethods.CurrentValue["FeedMachPushRivetBasic"] = CommonMethods.CurrentValue["_03_HMI.FeedMachPushRivetBasic"].ToString();
            //CommonMethods.CurrentValue["FeedMachPushRivetWork"] = CommonMethods.CurrentValue["_03_HMI.FeedMachPushRivetWork"].ToString();
            //CommonMethods.CurrentValue["FeedMachRivetOut"] = CommonMethods.CurrentValue["_03_HMI.FeedMachRivetOut"].ToString();
            //CommonMethods.CurrentValue["btDebug"] = CommonMethods.CurrentValue["_03_HMI.btDebug"].ToString();
            //CommonMethods.CurrentValue["btEnableVacuoValve"] = CommonMethods.CurrentValue["_03_HMI.btEnableVacuoValve"].ToString();
            //CommonMethods.CurrentValue["btDisableVacuoValve"] = CommonMethods.CurrentValue["_03_HMI.btDisableVacuoValve"].ToString();
            //CommonMethods.CurrentValue["btPrePressureExtendValve"] = CommonMethods.CurrentValue["_03_HMI.btPrePressureExtendValve"].ToString();
            //CommonMethods.CurrentValue["btPrePressureRetractValve"] = CommonMethods.CurrentValue["_03_HMI.btPrePressureRetractValve"].ToString();
            //CommonMethods.CurrentValue["btCachePlacePushRivetValve"] = CommonMethods.CurrentValue["_03_HMI.btCachePlacePushRivetValve"].ToString();
            //CommonMethods.CurrentValue["btClampValve"] = CommonMethods.CurrentValue["_03_HMI.btClampValve"].ToString();
            //CommonMethods.CurrentValue["btCachePlaceBlowRivetValve"] = CommonMethods.CurrentValue["_03_HMI.btCachePlaceBlowRivetValve"].ToString();
            //CommonMethods.CurrentValue["btGunHeadBlowRivetValve"] = CommonMethods.CurrentValue["_03_HMI.btGunHeadBlowRivetValve"].ToString();
            //CommonMethods.CurrentValue["btManualJogF1"] = CommonMethods.CurrentValue["_03_HMI.btManualJogF1"].ToString();
            //CommonMethods.CurrentValue["btManualJogB1"] = CommonMethods.CurrentValue["_03_HMI.btManualJogB1"].ToString();
            //CommonMethods.CurrentValue["btManualPower1"] = CommonMethods.CurrentValue["_03_HMI.btManualPower1"].ToString();
            //CommonMethods.CurrentValue["btReset1"] = CommonMethods.CurrentValue["_03_HMI.btReset1"].ToString();
            //CommonMethods.CurrentValue["btFeedMachPushRivetValve"] = CommonMethods.CurrentValue["_03_HMI.btFeedMachPushRivetValve"].ToString();
            //CommonMethods.CurrentValue["btFeedMachBlowRivetValve"] = CommonMethods.CurrentValue["_03_HMI.btFeedMachBlowRivetValve"].ToString();
            //CommonMethods.CurrentValue["btFeedMachRivetOutCounterClean"] = CommonMethods.CurrentValue["_03_HMI.btFeedMachRivetOutCounterClean"].ToString();
            //CommonMethods.CurrentValue["btFeedingTestStart_Stop"] = CommonMethods.CurrentValue["_03_HMI.btFeedingTestStart_Stop"].ToString();
            //CommonMethods.CurrentValue["btCachePlaceRivetInCounterClean"] = CommonMethods.CurrentValue["_03_HMI.btCachePlaceRivetInCounterClean"].ToString();
            //CommonMethods.CurrentValue["btCachePlaceRivetOutCounterClean"] = CommonMethods.CurrentValue["_03_HMI.btCachePlaceRivetOutCounterClean"].ToString();
            //CommonMethods.CurrentValue["btGunHeadRivetInCounterClean"] = CommonMethods.CurrentValue["_03_HMI.btGunHeadRivetInCounterClean"].ToString();
            //CommonMethods.CurrentValue["btInhaleRivetOKCounterClean"] = CommonMethods.CurrentValue["_03_HMI.btInhaleRivetOKCounterClean"].ToString();
            //CommonMethods.CurrentValue["status1"] = CommonMethods.CurrentValue["_03_HMI.status1"].ToString();
            //CommonMethods.CurrentValue["status2"] = CommonMethods.CurrentValue["_03_HMI.status2"].ToString();
            //CommonMethods.CurrentValue["status3"] = CommonMethods.CurrentValue["_03_HMI.status3"].ToString();
            //CommonMethods.CurrentValue["status4"] = CommonMethods.CurrentValue["_03_HMI.status4"].ToString();
            //CommonMethods.CurrentValue["status5"] = CommonMethods.CurrentValue["_03_HMI.status5"].ToString();
            //CommonMethods.CurrentValue["status6"] = CommonMethods.CurrentValue["_03_HMI.status6"].ToString();
            //CommonMethods.CurrentValue["status7"] = CommonMethods.CurrentValue["_03_HMI.status7"].ToString();
            //CommonMethods.CurrentValue["status8"] = CommonMethods.CurrentValue["_03_HMI.status8"].ToString();
            //CommonMethods.CurrentValue["CachePlaceRivetIn"] = CommonMethods.CurrentValue["_03_HMI.CachePlaceRivetIn"].ToString();
            //CommonMethods.CurrentValue["btFeedMachLastCycleCounterClean"] = CommonMethods.CurrentValue["_03_HMI.btFeedMachLastCycleCounterClean"].ToString();
            //CommonMethods.CurrentValue["btFeedMachNowCycleCounterClean"] = CommonMethods.CurrentValue["_03_HMI.btFeedMachNowCycleCounterClean"].ToString();
            //CommonMethods.CurrentValue["btGunLastCycleCounterClean"] = CommonMethods.CurrentValue["_03_HMI.btGunLastCycleCounterClean"].ToString();
            //CommonMethods.CurrentValue["btGunNowCycleCounterClean"] = CommonMethods.CurrentValue["_03_HMI.btGunNowCycleCounterClean"].ToString();
            //CommonMethods.CurrentValue["btInhaleRivetNOKCounterClean"] = CommonMethods.CurrentValue["_03_HMI.btInhaleRivetNOKCounterClean"].ToString();
            //CommonMethods.CurrentValue["btInhaleRivetActualCounterClean"] = CommonMethods.CurrentValue["_03_HMI.btInhaleRivetActualCounterClean"].ToString();
            //CommonMethods.CurrentValue["FeedMachNowCycleing"] = CommonMethods.CurrentValue["_03_HMI.FeedMachNowCycleing"].ToString();
            //CommonMethods.CurrentValue["GunNowCycleing"] = CommonMethods.CurrentValue["_03_HMI.GunNowCycleing"].ToString();
            //CommonMethods.CurrentValue["CachePlaceRivetAt"] = CommonMethods.CurrentValue["_03_HMI.CachePlaceRivetAt"].ToString();
            //CommonMethods.CurrentValue["FeedMachRivetOutOverTimeAlarm"] = CommonMethods.CurrentValue["_03_HMI.FeedMachRivetOutOverTimeAlarm"].ToString();
            //CommonMethods.CurrentValue["FeedMachRivetOutOverTimeReset"] = CommonMethods.CurrentValue["_03_HMI.FeedMachRivetOutOverTimeReset"].ToString();
            //CommonMethods.CurrentValue["CachePlaceRivetInOverTimeAlarm"] = CommonMethods.CurrentValue["_03_HMI.CachePlaceRivetInOverTimeAlarm"].ToString();
            //CommonMethods.CurrentValue["CachePlaceRivetInOverTimeReset"] = CommonMethods.CurrentValue["_03_HMI.CachePlaceRivetInOverTimeReset"].ToString();
            //CommonMethods.CurrentValue["CachePlaceRivetAtOverTimeAlarm"] = CommonMethods.CurrentValue["_03_HMI.CachePlaceRivetAtOverTimeAlarm"].ToString();
            //CommonMethods.CurrentValue["CachePlaceRivetAtOverTimeReset"] = CommonMethods.CurrentValue["_03_HMI.CachePlaceRivetAtOverTimeReset"].ToString();
            //CommonMethods.CurrentValue["FeedMachBlowRivetOverTimeAlarm"] = CommonMethods.CurrentValue["_03_HMI.FeedMachBlowRivetOverTimeAlarm"].ToString();
            //CommonMethods.CurrentValue["FeedMachBlowRivetOverTimeReset"] = CommonMethods.CurrentValue["_03_HMI.FeedMachBlowRivetOverTimeReset"].ToString();
            //CommonMethods.CurrentValue["CachePlaceRivetOutOverTimeAlarm"] = CommonMethods.CurrentValue["_03_HMI.CachePlaceRivetOutOverTimeAlarm"].ToString();
            //CommonMethods.CurrentValue["CachePlaceRivetOutOverTimeReset"] = CommonMethods.CurrentValue["_03_HMI.CachePlaceRivetOutOverTimeReset"].ToString();
            //CommonMethods.CurrentValue["GunHeadRivetInOverTimeAlarm"] = CommonMethods.CurrentValue["_03_HMI.GunHeadRivetInOverTimeAlarm"].ToString();
            //CommonMethods.CurrentValue["GunHeadRivetInOverTimeReset"] = CommonMethods.CurrentValue["_03_HMI.GunHeadRivetInOverTimeReset"].ToString();
            //CommonMethods.CurrentValue["CachePlaceBlowRivetOverTimeAlarm"] = CommonMethods.CurrentValue["_03_HMI.CachePlaceBlowRivetOverTimeAlarm"].ToString();
            //CommonMethods.CurrentValue["CachePlaceBlowRivetOverTimeReset"] = CommonMethods.CurrentValue["_03_HMI.CachePlaceBlowRivetOverTimeReset"].ToString();
            //CommonMethods.CurrentValue["FeedingNOKLater_CycleContinue"] = CommonMethods.CurrentValue["_03_HMI.FeedingNOKLater_CycleContinue"].ToString();
            //CommonMethods.CurrentValue["InhaleRivetLater_DisableVacuoAlarm"] = CommonMethods.CurrentValue["_03_HMI.InhaleRivetLater_DisableVacuoAlarm"].ToString();
            //CommonMethods.CurrentValue["InhaleRivetLater_DisableVacuoReset"] = CommonMethods.CurrentValue["_03_HMI.InhaleRivetLater_DisableVacuoReset"].ToString();
            //CommonMethods.CurrentValue["btDay_Night"] = CommonMethods.CurrentValue["_03_HMI.btDay_Night"].ToString();
            //CommonMethods.CurrentValue["PrePressureWork1"] = CommonMethods.CurrentValue["_03_HMI.PrePressureWork1"].ToString();
            //CommonMethods.CurrentValue["PrePressureBasic1"] = CommonMethods.CurrentValue["_03_HMI.PrePressureBasic1"].ToString();
            //CommonMethods.CurrentValue["PrePressureWork2"] = CommonMethods.CurrentValue["_03_HMI.PrePressureWork2"].ToString();
            //CommonMethods.CurrentValue["PrePressureBasic2"] = CommonMethods.CurrentValue["_03_HMI.PrePressureBasic2"].ToString();
            //CommonMethods.CurrentValue["CachePlacePushRivetWork"] = CommonMethods.CurrentValue["_03_HMI.CachePlacePushRivetWork"].ToString();
            //CommonMethods.CurrentValue["CachePlacePushRivetBasic"] = CommonMethods.CurrentValue["_03_HMI.CachePlacePushRivetBasic"].ToString();
            //CommonMethods.CurrentValue["ClampWork"] = CommonMethods.CurrentValue["_03_HMI.ClampWork"].ToString();
            //CommonMethods.CurrentValue["ClampBasic"] = CommonMethods.CurrentValue["_03_HMI.ClampBasic"].ToString();
            //CommonMethods.CurrentValue["CachePlaceRivetOut"] = CommonMethods.CurrentValue["_03_HMI.CachePlaceRivetOut"].ToString();
            //CommonMethods.CurrentValue["GunHeadRivetIn"] = CommonMethods.CurrentValue["_03_HMI.GunHeadRivetIn"].ToString();
            //CommonMethods.CurrentValue["LimitSwitchUp"] = CommonMethods.CurrentValue["_03_HMI.LimitSwitchUp"].ToString();
            //CommonMethods.CurrentValue["LimitSwitchOrigin"] = CommonMethods.CurrentValue["_03_HMI.LimitSwitchOrigin"].ToString();
            //CommonMethods.CurrentValue["LimitSwitchDown"] = CommonMethods.CurrentValue["_03_HMI.LimitSwitchDown"].ToString();
            //CommonMethods.CurrentValue["VacuoValueRch1"] = CommonMethods.CurrentValue["_03_HMI.VacuoValueRch1"].ToString();
            //CommonMethods.CurrentValue["btMotorDebug"] = CommonMethods.CurrentValue["_03_HMI.btMotorDebug"].ToString();
            //CommonMethods.CurrentValue["btFeedTest"] = CommonMethods.CurrentValue["_03_HMI.btFeedTest"].ToString();
            //CommonMethods.CurrentValue["SysStep"] = CommonMethods.CurrentValue["_03_HMI.SysStep"].ToString();
            //CommonMethods.CurrentValue["ManualStep"] = CommonMethods.CurrentValue["_03_HMI.ManualStep"].ToString();
            //CommonMethods.CurrentValue["AutoStep"] = CommonMethods.CurrentValue["_03_HMI.AutoStep"].ToString();
            //CommonMethods.CurrentValue["DebugStep"] = CommonMethods.CurrentValue["_03_HMI.DebugStep"].ToString();
            //CommonMethods.CurrentValue["ExcStep"] = CommonMethods.CurrentValue["_03_HMI.ExcStep"].ToString();
            //CommonMethods.CurrentValue["Timer"] = CommonMethods.CurrentValue["_03_HMI.Timer"].ToString();
            //CommonMethods.CurrentValue["FeedingTime"] = CommonMethods.CurrentValue["_03_HMI.FeedingTime"].ToString();
            //CommonMethods.CurrentValue["PrePressingTime"] = CommonMethods.CurrentValue["_03_HMI.PrePressingTime"].ToString();
            //CommonMethods.CurrentValue["RivetingTime"] = CommonMethods.CurrentValue["_03_HMI.RivetingTime"].ToString();
            //CommonMethods.CurrentValue["MaxFeedingTime"] = CommonMethods.CurrentValue["_03_HMI.MaxFeedingTime"].ToString();
            //CommonMethods.CurrentValue["MaxPrePressingTime"] = CommonMethods.CurrentValue["_03_HMI.MaxPrePressingTime"].ToString();
            //CommonMethods.CurrentValue["MaxRivetingTime"] = CommonMethods.CurrentValue["_03_HMI.MaxRivetingTime"].ToString();
            //CommonMethods.CurrentValue["MultistageId"] = CommonMethods.CurrentValue["_03_HMI.MultistageId"].ToString();
            //CommonMethods.CurrentValue["TestFeedingTime"] = CommonMethods.CurrentValue["_03_HMI.TestFeedingTime"].ToString();
            //CommonMethods.CurrentValue["EnableVacuoValve_VacuoRchTime"] = CommonMethods.CurrentValue["_03_HMI.EnableVacuoValve_VacuoRchTime"].ToString();
            //CommonMethods.CurrentValue["VacuoRchLater_SampleTime"] = CommonMethods.CurrentValue["_03_HMI.VacuoRchLater_SampleTime"].ToString();
            //CommonMethods.CurrentValue["EnableVacuoValveLater_SampleTime1"] = CommonMethods.CurrentValue["_03_HMI.EnableVacuoValveLater_SampleTime1"].ToString();
            //CommonMethods.CurrentValue["EnableVacuoValveLater_SampleTime2"] = CommonMethods.CurrentValue["_03_HMI.EnableVacuoValveLater_SampleTime2"].ToString();
            //CommonMethods.CurrentValue["FeedMachRivetOutOverTime"] = CommonMethods.CurrentValue["_03_HMI.FeedMachRivetOutOverTime"].ToString();
            //CommonMethods.CurrentValue["CachePlaceRivetInOverTime"] = CommonMethods.CurrentValue["_03_HMI.CachePlaceRivetInOverTime"].ToString();
            //CommonMethods.CurrentValue["CachePlaceRivetAtOverTime"] = CommonMethods.CurrentValue["_03_HMI.CachePlaceRivetAtOverTime"].ToString();
            //CommonMethods.CurrentValue["CachePlaceRivetAtHeartbeatTime"] = CommonMethods.CurrentValue["_03_HMI.CachePlaceRivetAtHeartbeatTime"].ToString();
            //CommonMethods.CurrentValue["CachePlaceRivetOutOverTime"] = CommonMethods.CurrentValue["_03_HMI.CachePlaceRivetOutOverTime"].ToString();
            //CommonMethods.CurrentValue["GunHeadRivetInOverTime"] = CommonMethods.CurrentValue["_03_HMI.GunHeadRivetInOverTime"].ToString();
            //CommonMethods.CurrentValue["GunHeadRivetIn_EnableVacuoValveDelayTime"] = CommonMethods.CurrentValue["_03_HMI.GunHeadRivetIn_EnableVacuoValveDelayTime"].ToString();
            //CommonMethods.CurrentValue["FeedTest_InhaleRivetMaxTime"] = CommonMethods.CurrentValue["_03_HMI.FeedTest_InhaleRivetMaxTime"].ToString();
            //CommonMethods.CurrentValue["FeedTest_InhaleRivetIntervalTime"] = CommonMethods.CurrentValue["_03_HMI.FeedTest_InhaleRivetIntervalTime"].ToString();
            //CommonMethods.CurrentValue["FeedMachModel"] = CommonMethods.CurrentValue["_03_HMI.FeedMachModel"].ToString();
            //CommonMethods.CurrentValue["FeedMachRivetOutCounter"] = CommonMethods.CurrentValue["_03_HMI.FeedMachRivetOutCounter"].ToString();
            //CommonMethods.CurrentValue["CachePlaceRivetInCounter"] = CommonMethods.CurrentValue["_03_HMI.CachePlaceRivetInCounter"].ToString();
            //CommonMethods.CurrentValue["InhaleRivetOKCounter"] = CommonMethods.CurrentValue["_03_HMI.InhaleRivetOKCounter"].ToString();
            //CommonMethods.CurrentValue["FeedTest_InhaleRivetMaxCounter"] = CommonMethods.CurrentValue["_03_HMI.FeedTest_InhaleRivetMaxCounter"].ToString();
            //CommonMethods.CurrentValue["FeedMachLastCycleCounter"] = CommonMethods.CurrentValue["_03_HMI.FeedMachLastCycleCounter"].ToString();
            //CommonMethods.CurrentValue["FeedMachNowCycleCounter"] = CommonMethods.CurrentValue["_03_HMI.FeedMachNowCycleCounter"].ToString();
            //CommonMethods.CurrentValue["GunLastCycleCounter"] = CommonMethods.CurrentValue["_03_HMI.GunLastCycleCounter"].ToString();
            //CommonMethods.CurrentValue["GunNowCycleCounter"] = CommonMethods.CurrentValue["_03_HMI.GunNowCycleCounter"].ToString();
            //CommonMethods.CurrentValue["InhaleRivetNOKCounter"] = CommonMethods.CurrentValue["_03_HMI.InhaleRivetNOKCounter"].ToString();
            //CommonMethods.CurrentValue["InhaleRivetActualCounter"] = CommonMethods.CurrentValue["_03_HMI.InhaleRivetActualCounter"].ToString();
            //CommonMethods.CurrentValue["RivetInCounter"] = CommonMethods.CurrentValue["_03_HMI.RivetInCounter"].ToString();
            //CommonMethods.CurrentValue["RivetOutCounter"] = CommonMethods.CurrentValue["_03_HMI.RivetOutCounter"].ToString();
            //CommonMethods.CurrentValue["JogVelocity1"] = CommonMethods.CurrentValue["_03_HMI.JogVelocity1"].ToString();
            //CommonMethods.CurrentValue["MaxPressure"] = CommonMethods.CurrentValue["_03_HMI.MaxPressure"].ToString();
            //CommonMethods.CurrentValue["MaxTorque"] = CommonMethods.CurrentValue["_03_HMI.MaxTorque"].ToString();
            //CommonMethods.CurrentValue["FeedPos1"] = CommonMethods.CurrentValue["_03_HMI.FeedPos1"].ToString();
            //CommonMethods.CurrentValue["VacuoValue1"] = CommonMethods.CurrentValue["_03_HMI.VacuoValue1"].ToString();
            //CommonMethods.CurrentValue["SingleCycleVacuoValue"] = CommonMethods.CurrentValue["_03_HMI.SingleCycleVacuoValue"].ToString();
            //CommonMethods.CurrentValue["PrePressureSetValue"] = CommonMethods.CurrentValue["_03_HMI.PrePressureSetValue"].ToString();
            //CommonMethods.CurrentValue["PrePressureRefValue"] = CommonMethods.CurrentValue["_03_HMI.PrePressureRefValue"].ToString();
            //CommonMethods.CurrentValue["DataPressure"] = CommonMethods.CurrentValue["_03_HMI.DataPressure"].ToString();
            //CommonMethods.CurrentValue["DataTorque"] = CommonMethods.CurrentValue["_03_HMI.DataTorque"].ToString();
            //CommonMethods.CurrentValue["ActVelo2"] = CommonMethods.CurrentValue["_03_HMI.ActVelo2"].ToString();
            //CommonMethods.CurrentValue["ActVelo1"] = CommonMethods.CurrentValue["_03_HMI.ActVelo1"].ToString();
            //CommonMethods.CurrentValue["ActPos2"] = CommonMethods.CurrentValue["_03_HMI.ActPos2"].ToString();
            //CommonMethods.CurrentValue["EnableVacuoValveLater_VacuoValue1"] = CommonMethods.CurrentValue["_03_HMI.EnableVacuoValveLater_VacuoValue1"].ToString();
            //CommonMethods.CurrentValue["EnableVacuoValveLater_VacuoValue2"] = CommonMethods.CurrentValue["_03_HMI.EnableVacuoValveLater_VacuoValue2"].ToString();
            //CommonMethods.CurrentValue["FeedTest_Velo1"] = CommonMethods.CurrentValue["_03_HMI.FeedTest_Velo1"].ToString();
            //CommonMethods.CurrentValue["FeedTest_Acc1"] = CommonMethods.CurrentValue["_03_HMI.FeedTest_Acc1"].ToString();
            //CommonMethods.CurrentValue["FeedTest_Dec1"] = CommonMethods.CurrentValue["_03_HMI.FeedTest_Dec1"].ToString();
            //CommonMethods.CurrentValue["FeedTest_Jerk1"] = CommonMethods.CurrentValue["_03_HMI.FeedTest_Jerk1"].ToString();
            //CommonMethods.CurrentValue["FeedTest_Velo2"] = CommonMethods.CurrentValue["_03_HMI.FeedTest_Velo2"].ToString();
            //CommonMethods.CurrentValue["FeedTest_Acc2"] = CommonMethods.CurrentValue["_03_HMI.FeedTest_Acc2"].ToString();
            //CommonMethods.CurrentValue["FeedTest_Dec2"] = CommonMethods.CurrentValue["_03_HMI.FeedTest_Dec2"].ToString();
            //CommonMethods.CurrentValue["FeedTest_Jerk2"] = CommonMethods.CurrentValue["_03_HMI.FeedTest_Jerk2"].ToString();
            //CommonMethods.CurrentValue["FeedTest_InhaleRivetTargetPos"] = CommonMethods.CurrentValue["_03_HMI.FeedTest_InhaleRivetTargetPos"].ToString();

        }

        public static void ReadStruct()
        {
            try
            {
                sResult = (TestStruct)tcAdsClient.ReadAny(iHandleStruct, typeof(TestStruct));
              
                CommonMethods.CurrentValue["Enabled1"] = sResult.bVar1.ToString();
                CommonMethods.CurrentValue["Enabled2"] = sResult.bVar2.ToString();
                CommonMethods.CurrentValue["Error1"] = sResult.bVar3.ToString();
                CommonMethods.CurrentValue["Error2"] = sResult.bVar4.ToString();
                CommonMethods.CurrentValue["SysManualMode"] = sResult.bVar5.ToString();
                CommonMethods.CurrentValue["SysAutoMode"] = sResult.bVar6.ToString();
                CommonMethods.CurrentValue["SysDebugMode"] = sResult.bVar7.ToString();
                CommonMethods.CurrentValue["SysExcMode"] = sResult.bVar8.ToString();
                CommonMethods.CurrentValue["SysIsReady"] = sResult.bVar9.ToString();
                CommonMethods.CurrentValue["SysAlarmActive"] = sResult.bVar10.ToString();
                CommonMethods.CurrentValue["ErrDoorOpen"] = sResult.bVar11.ToString();
                CommonMethods.CurrentValue["ParaConfirmed"] = sResult.bVar12.ToString();
                CommonMethods.CurrentValue["SysNotEmgStop"] = sResult.bVar13.ToString();
                CommonMethods.CurrentValue["Feeding"] = sResult.bVar14.ToString();
                CommonMethods.CurrentValue["PrePressing"] = sResult.bVar15.ToString();
                CommonMethods.CurrentValue["Riveting"] = sResult.bVar16.ToString();
                CommonMethods.CurrentValue["FeedingStop"] = sResult.bVar17.ToString();
                CommonMethods.CurrentValue["PrePressingStop"] = sResult.bVar18.ToString();
                CommonMethods.CurrentValue["RivetingStop"] = sResult.bVar19.ToString();
                CommonMethods.CurrentValue["FeedingOK"] = sResult.bVar20.ToString();
                CommonMethods.CurrentValue["PrePressingOK"] = sResult.bVar21.ToString();
                CommonMethods.CurrentValue["RivetingOK"] = sResult.bVar22.ToString();
                CommonMethods.CurrentValue["FeedingNOK"] = sResult.bVar23.ToString();
                CommonMethods.CurrentValue["PrePressingNOK"] = sResult.bVar24.ToString();
                CommonMethods.CurrentValue["RivetingNOK"] = sResult.bVar25.ToString();
                CommonMethods.CurrentValue["FeedMachRivetOK"] = sResult.bVar26.ToString();
                CommonMethods.CurrentValue["FeedMachPushRivetBasic"] = sResult.bVar27.ToString();
                CommonMethods.CurrentValue["FeedMachPushRivetWork"] = sResult.bVar28.ToString();
                CommonMethods.CurrentValue["FeedMachRivetOut"] = sResult.bVar29.ToString();
                CommonMethods.CurrentValue["btDebug"] = sResult.bVar30.ToString();
                CommonMethods.CurrentValue["btEnableVacuoValve"] = sResult.bVar31.ToString();
                CommonMethods.CurrentValue["btDisableVacuoValve"] = sResult.bVar32.ToString();
                CommonMethods.CurrentValue["btPrePressureExtendValve"] = sResult.bVar33.ToString();
                CommonMethods.CurrentValue["btPrePressureRetractValve"] = sResult.bVar34.ToString();
                CommonMethods.CurrentValue["btCachePlacePushRivetValve"] = sResult.bVar35.ToString();
                CommonMethods.CurrentValue["btClampValve"] = sResult.bVar36.ToString();
                CommonMethods.CurrentValue["btCachePlaceBlowRivetValve"] = sResult.bVar37.ToString();
                CommonMethods.CurrentValue["btGunHeadBlowRivetValve"] = sResult.bVar38.ToString();
                CommonMethods.CurrentValue["btManualJogF1"] = sResult.bVar39.ToString();
                CommonMethods.CurrentValue["btManualJogB1"] = sResult.bVar40.ToString();
                CommonMethods.CurrentValue["btManualPower1"] = sResult.bVar41.ToString();
                CommonMethods.CurrentValue["btReset1"] = sResult.bVar42.ToString();
                CommonMethods.CurrentValue["btManualJogF2"] = sResult.bVar43.ToString();
                CommonMethods.CurrentValue["btManualJogB2"] = sResult.bVar44.ToString();
                CommonMethods.CurrentValue["btManualPower2"] = sResult.bVar45.ToString();
                CommonMethods.CurrentValue["btReset2"] = sResult.bVar46.ToString();
                CommonMethods.CurrentValue["PressConfirmed"] = sResult.bVar47.ToString();
                CommonMethods.CurrentValue["btFeedMachPushRivetValve"] = sResult.bVar48.ToString();
                CommonMethods.CurrentValue["btFeedMachBlowRivetValve"] = sResult.bVar49.ToString();
                CommonMethods.CurrentValue["btFeedMachRivetOutCounterClean"] = sResult.bVar50.ToString();
                CommonMethods.CurrentValue["btFeedingTestStart_Stop"] = sResult.bVar51.ToString();
                CommonMethods.CurrentValue["btCachePlaceRivetInCounterClean"] = sResult.bVar52.ToString();
                CommonMethods.CurrentValue["btCachePlaceRivetOutCounterClean"] = sResult.bVar53.ToString();
                CommonMethods.CurrentValue["btGunHeadRivetInCounterClean"] = sResult.bVar54.ToString();
                CommonMethods.CurrentValue["btInhaleRivetOKCounterClean"] = sResult.bVar55.ToString();
                CommonMethods.CurrentValue["btAbsExecute"] = sResult.bVar56.ToString();
                CommonMethods.CurrentValue["btHome"] = sResult.bVar57.ToString();
                CommonMethods.CurrentValue["status1"] = sResult.bVar58.ToString();
                CommonMethods.CurrentValue["status2"] = sResult.bVar59.ToString();
                CommonMethods.CurrentValue["status3"] = sResult.bVar60.ToString();
                CommonMethods.CurrentValue["status4"] = sResult.bVar61.ToString();
                CommonMethods.CurrentValue["status5"] = sResult.bVar62.ToString();
                CommonMethods.CurrentValue["status6"] = sResult.bVar63.ToString();
                CommonMethods.CurrentValue["status7"] = sResult.bVar64.ToString();
                CommonMethods.CurrentValue["status8"] = sResult.bVar65.ToString();


                 
                //增加
                CommonMethods.CurrentValue["CachePlaceRivetIn"] = sResult.bVar66.ToString();
                CommonMethods.CurrentValue["btFeedMachLastCycleCounterClean"] = sResult.bVar67.ToString();
                CommonMethods.CurrentValue["btFeedMachNowCycleCounterClean"] = sResult.bVar68.ToString();
                CommonMethods.CurrentValue["btGunLastCycleCounterClean"] = sResult.bVar69.ToString();
                CommonMethods.CurrentValue["btGunNowCycleCounterClean"] = sResult.bVar70.ToString();
                CommonMethods.CurrentValue["btInhaleRivetNOKCounterClean"] = sResult.bVar71.ToString();
                CommonMethods.CurrentValue["btInhaleRivetActualCounterClean"] = sResult.bVar72.ToString();
                CommonMethods.CurrentValue["FeedMachNowCycleing"] = sResult.bVar73.ToString();
                CommonMethods.CurrentValue["GunNowCycleing"] = sResult.bVar74.ToString();
                CommonMethods.CurrentValue["CachePlaceRivetAt"] = sResult.bVar75.ToString();
                CommonMethods.CurrentValue["FeedMachRivetOutOverTimeAlarm"] = sResult.bVar76.ToString();
                CommonMethods.CurrentValue["FeedMachRivetOutOverTimeReset"] = sResult.bVar77.ToString();
                CommonMethods.CurrentValue["CachePlaceRivetInOverTimeAlarm"] = sResult.bVar78.ToString();
                CommonMethods.CurrentValue["CachePlaceRivetInOverTimeReset"] = sResult.bVar79.ToString();
                CommonMethods.CurrentValue["CachePlaceRivetAtOverTimeAlarm"] = sResult.bVar80.ToString();
                CommonMethods.CurrentValue["CachePlaceRivetAtOverTimeReset"] = sResult.bVar81.ToString();
                CommonMethods.CurrentValue["FeedMachBlowRivetOverTimeAlarm"] = sResult.bVar82.ToString();
                CommonMethods.CurrentValue["FeedMachBlowRivetOverTimeReset"] = sResult.bVar83.ToString();
                CommonMethods.CurrentValue["CachePlaceRivetOutOverTimeAlarm"] = sResult.bVar84.ToString();
                CommonMethods.CurrentValue["CachePlaceRivetOutOverTimeReset"] = sResult.bVar85.ToString();
                CommonMethods.CurrentValue["GunHeadRivetInOverTimeAlarm"] = sResult.bVar86.ToString();
                CommonMethods.CurrentValue["GunHeadRivetInOverTimeReset"] = sResult.bVar87.ToString();
                CommonMethods.CurrentValue["CachePlaceBlowRivetOverTimeAlarm"] = sResult.bVar88.ToString();
                CommonMethods.CurrentValue["CachePlaceBlowRivetOverTimeReset"] = sResult.bVar89.ToString();

                CommonMethods.CurrentValue["FeedingNOKLater_CycleContinue"] = sResult.bVar90.ToString();
                CommonMethods.CurrentValue["InhaleRivetLater_DisableVacuoAlarm"] = sResult.bVar91.ToString();
                CommonMethods.CurrentValue["InhaleRivetLater_DisableVacuoReset"] = sResult.bVar92.ToString();
                CommonMethods.CurrentValue["btDay_Night"] = sResult.bVar93.ToString();

                CommonMethods.CurrentValue["PrePressureWork1"] = sResult.bVar94.ToString();
                CommonMethods.CurrentValue["PrePressureBasic1"] = sResult.bVar95.ToString();
                CommonMethods.CurrentValue["PrePressureWork2"] = sResult.bVar96.ToString();
                CommonMethods.CurrentValue["PrePressureBasic2"] = sResult.bVar97.ToString();
                CommonMethods.CurrentValue["CachePlacePushRivetWork"] = sResult.bVar98.ToString();
                CommonMethods.CurrentValue["CachePlacePushRivetBasic"] = sResult.bVar99.ToString();
                CommonMethods.CurrentValue["ClampWork"] = sResult.bVar100.ToString();
                CommonMethods.CurrentValue["ClampBasic"] = sResult.bVar101.ToString();
                CommonMethods.CurrentValue["CachePlaceRivetOut"] = sResult.bVar102.ToString();
                CommonMethods.CurrentValue["GunHeadRivetIn"] = sResult.bVar103.ToString();
                CommonMethods.CurrentValue["LimitSwitchUp"] = sResult.bVar104.ToString();
                CommonMethods.CurrentValue["LimitSwitchOrigin"] = sResult.bVar105.ToString();
                CommonMethods.CurrentValue["LimitSwitchDown"] = sResult.bVar106.ToString();
                CommonMethods.CurrentValue["VacuoValueRch1"] = sResult.bVar107.ToString();

                CommonMethods.CurrentValue["btMotorDebug"] = sResult.bVar108.ToString();
                CommonMethods.CurrentValue["btFeedTest"] = sResult.bVar109.ToString();

                CommonMethods.CurrentValue["StopTorqueConfirmed"] = sResult.bVar110.ToString();


                 
                CommonMethods.CurrentValue["SysStep"] = sResult.uVar1.ToString();
                CommonMethods.CurrentValue["ManualStep"] = sResult.uVar2.ToString();
                CommonMethods.CurrentValue["AutoStep"] = sResult.uVar3.ToString();
                CommonMethods.CurrentValue["DebugStep"] = sResult.uVar4.ToString();
                CommonMethods.CurrentValue["ExcStep"] = sResult.uVar5.ToString();
                CommonMethods.CurrentValue["Timer"] = sResult.uVar6.ToString();
                CommonMethods.CurrentValue["CPUuse"] = sResult.uVar7.ToString();
                CommonMethods.CurrentValue["PosRange"] = sResult.uVar8.ToString();
                CommonMethods.CurrentValue["FeedingTime"] = sResult.uVar9.ToString();
                CommonMethods.CurrentValue["PrePressingTime"] = sResult.uVar10.ToString();
                CommonMethods.CurrentValue["RivetingTime"] = sResult.uVar11.ToString();
                CommonMethods.CurrentValue["MaxFeedingTime"] = sResult.uVar12.ToString();
                CommonMethods.CurrentValue["MaxPrePressingTime"] = sResult.uVar13.ToString();
                CommonMethods.CurrentValue["MaxRivetingTime"] = sResult.uVar14.ToString();
                CommonMethods.CurrentValue["EngageTime"] = sResult.uVar15.ToString(); 
                CommonMethods.CurrentValue["RivetingCounter"] = sResult.uVar16.ToString();
                CommonMethods.CurrentValue["MultistageId"] = sResult.uVar17.ToString();
                CommonMethods.CurrentValue["PressTime"] = sResult.uVar18.ToString();
                CommonMethods.CurrentValue["TestFeedingTime"] = sResult.uVar19.ToString();

                //增加
                CommonMethods.CurrentValue["EnableVacuoValve_VacuoRchTime"] = sResult.uVar20.ToString();
                CommonMethods.CurrentValue["VacuoRchLater_SampleTime"] = sResult.uVar21.ToString();
                CommonMethods.CurrentValue["EnableVacuoValveLater_SampleTime1"] = sResult.uVar22.ToString();
                CommonMethods.CurrentValue["EnableVacuoValveLater_SampleTime2"] = sResult.uVar23.ToString();
                CommonMethods.CurrentValue["FeedMachRivetOutOverTime"] = sResult.uVar24.ToString();
                CommonMethods.CurrentValue["CachePlaceRivetInOverTime"] = sResult.uVar25.ToString();
                CommonMethods.CurrentValue["CachePlaceRivetAtOverTime"] = sResult.uVar26.ToString();
                CommonMethods.CurrentValue["CachePlaceRivetAtHeartbeatTime"] = sResult.uVar27.ToString();
                CommonMethods.CurrentValue["CachePlaceRivetOutOverTime"] = sResult.uVar28.ToString();
                CommonMethods.CurrentValue["GunHeadRivetInOverTime"] = sResult.uVar29.ToString(); 
                CommonMethods.CurrentValue["GunHeadRivetIn_EnableVacuoValveDelayTime"] = sResult.uVar30.ToString();
                CommonMethods.CurrentValue["FeedTest_InhaleRivetMaxTime"] = sResult.uVar31.ToString(); 
               CommonMethods.CurrentValue["FeedTest_InhaleRivetIntervalTime"] = sResult.uVar32.ToString();
                //UINT 16   DINT32 
                CommonMethods.CurrentValue["FeedMachModel"] = sResult.uintVar1.ToString();
                CommonMethods.CurrentValue["FeedMachRivetOutCounter"] = sResult.uintVar2.ToString();
                CommonMethods.CurrentValue["CachePlaceRivetInCounter"] = sResult.uintVar3.ToString();
                CommonMethods.CurrentValue["InhaleRivetOKCounter"] = sResult.uintVar4.ToString(); 
                //增加
                CommonMethods.CurrentValue["FeedTest_InhaleRivetMaxCounter"] = sResult.uintVar5.ToString();
                CommonMethods.CurrentValue["FeedMachLastCycleCounter"] = sResult.uintVar6.ToString();
                CommonMethods.CurrentValue["FeedMachNowCycleCounter"] = sResult.uintVar7.ToString();
                CommonMethods.CurrentValue["GunLastCycleCounter"] = sResult.uintVar8.ToString();
                CommonMethods.CurrentValue["GunNowCycleCounter"] = sResult.uintVar9.ToString();
                CommonMethods.CurrentValue["InhaleRivetNOKCounter"] = sResult.uintVar10.ToString();
                CommonMethods.CurrentValue["InhaleRivetActualCounter"] = sResult.uintVar11.ToString();  
                CommonMethods.CurrentValue["RivetInCounter"] = sResult.uintVar12.ToString();
                CommonMethods.CurrentValue["RivetOutCounter"] = sResult.uintVar13.ToString();


                 
                CommonMethods.CurrentValue["JogVelocity1"] = sResult.fVar1.ToString();
                CommonMethods.CurrentValue["JogVelocity2"] = sResult.fVar2.ToString();
                CommonMethods.CurrentValue["SetPos2"] = sResult.fVar3.ToString();
                CommonMethods.CurrentValue["SetVelo2"] = sResult.fVar4.ToString();
                CommonMethods.CurrentValue["ActTorque2"] = sResult.fVar5.ToString();
                CommonMethods.CurrentValue["SetTorque2"] = sResult.fVar6.ToString();
                CommonMethods.CurrentValue["ActTorque1"] = sResult.fVar7.ToString();
                CommonMethods.CurrentValue["MaxPressure"] = sResult.fVar8.ToString();
                CommonMethods.CurrentValue["MaxTorque"] = sResult.fVar9.ToString();
                CommonMethods.CurrentValue["FeedVelo1"] = sResult.fVar10.ToString();
                CommonMethods.CurrentValue["FeedVelo2"] = sResult.fVar11.ToString();
                CommonMethods.CurrentValue["FeedPos1"] = sResult.fVar12.ToString();
                CommonMethods.CurrentValue["Pre_Downforce1"] = sResult.fVar13.ToString();
                CommonMethods.CurrentValue["Constant_Downforce1"] = sResult.fVar14.ToString();
                CommonMethods.CurrentValue["Pre_Position1"] = sResult.fVar15.ToString();
                CommonMethods.CurrentValue["Pre_Position2"] = sResult.fVar16.ToString();
                CommonMethods.CurrentValue["FSR_ContactPos1"] = sResult.fVar17.ToString();
                CommonMethods.CurrentValue["SSFR_ContactPos1"] = sResult.fVar18.ToString();
                CommonMethods.CurrentValue["StopPos1"] = sResult.fVar19.ToString();
                CommonMethods.CurrentValue["StopPressure1"] = sResult.fVar20.ToString();
                CommonMethods.CurrentValue["EngageSpeed"] = sResult.fVar21.ToString();
                CommonMethods.CurrentValue["FSR_FeedPos1"] = sResult.fVar22.ToString();
                CommonMethods.CurrentValue["SSFR_FeedPos1"] = sResult.fVar23.ToString();
                CommonMethods.CurrentValue["UpperPos1"] = sResult.fVar24.ToString();
                CommonMethods.CurrentValue["LowerPos1"] = sResult.fVar25.ToString();
                CommonMethods.CurrentValue["TargetPos1"] = sResult.fVar26.ToString();
                CommonMethods.CurrentValue["TargetPos2"] = sResult.fVar27.ToString();
                CommonMethods.CurrentValue["TargetPos3"] = sResult.fVar28.ToString();
                CommonMethods.CurrentValue["TargetPos4"] = sResult.fVar29.ToString();
                CommonMethods.CurrentValue["TargetPos5"] = sResult.fVar30.ToString();
                CommonMethods.CurrentValue["TargetPos6"] = sResult.fVar31.ToString();
                CommonMethods.CurrentValue["TargetVelo1"] = sResult.fVar32.ToString();
                CommonMethods.CurrentValue["TargetVelo2"] = sResult.fVar33.ToString();
                CommonMethods.CurrentValue["TargetVelo3"] = sResult.fVar34.ToString();
                CommonMethods.CurrentValue["TargetVelo4"] = sResult.fVar35.ToString();
                CommonMethods.CurrentValue["TargetVelo5"] = sResult.fVar36.ToString();
                CommonMethods.CurrentValue["TargetVelo6"] = sResult.fVar37.ToString();
                CommonMethods.CurrentValue["RotationalSpeed1"] = sResult.fVar38.ToString();
                CommonMethods.CurrentValue["RotationalSpeed2"] = sResult.fVar39.ToString();
                CommonMethods.CurrentValue["RotationalSpeed3"] = sResult.fVar40.ToString();
                CommonMethods.CurrentValue["RotationalSpeed4"] = sResult.fVar41.ToString();
                CommonMethods.CurrentValue["RotationalSpeed5"] = sResult.fVar42.ToString();
                CommonMethods.CurrentValue["TargetDownforce1"] = sResult.fVar43.ToString();
                CommonMethods.CurrentValue["VacuoValue1"] = sResult.fVar44.ToString();
                CommonMethods.CurrentValue["SingleCycleVacuoValue"] = sResult.fVar45.ToString("f3");
                CommonMethods.CurrentValue["AbsPos"] = sResult.fVar46.ToString();
                CommonMethods.CurrentValue["AbsVelo"] = sResult.fVar47.ToString();
                CommonMethods.CurrentValue["HomeOffset"] = sResult.fVar48.ToString();
                CommonMethods.CurrentValue["HomeAbsSet"] = sResult.fVar49.ToString();
                CommonMethods.CurrentValue["PrePressureSetValue"] = sResult.fVar50.ToString("f3");
                CommonMethods.CurrentValue["PrePressureRefValue"] = sResult.fVar51.ToString("f3");
                CommonMethods.CurrentValue["DataPressure"] = sResult.fVar52.ToString();
                CommonMethods.CurrentValue["DataTorque"] = sResult.fVar53.ToString();
                CommonMethods.CurrentValue["ActVelo2"] = sResult.fVar54.ToString();
                CommonMethods.CurrentValue["ActVelo1"] = sResult.fVar55.ToString();
                CommonMethods.CurrentValue["ActPos2"] = sResult.fVar56.ToString();

                //增加
                CommonMethods.CurrentValue["EnableVacuoValveLater_VacuoValue1"] = sResult.fVar57.ToString("f3");
                CommonMethods.CurrentValue["EnableVacuoValveLater_VacuoValue2"] = sResult.fVar58.ToString("f3");
                CommonMethods.CurrentValue["FeedTest_Velo1"] = sResult.fVar59.ToString();
                CommonMethods.CurrentValue["FeedTest_Acc1"] = sResult.fVar60.ToString();
                CommonMethods.CurrentValue["FeedTest_Dec1"] = sResult.fVar61.ToString();
                CommonMethods.CurrentValue["FeedTest_Jerk1"] = sResult.fVar62.ToString();
                CommonMethods.CurrentValue["FeedTest_Velo2"] = sResult.fVar63.ToString();
                CommonMethods.CurrentValue["FeedTest_Acc2"] = sResult.fVar64.ToString();
                CommonMethods.CurrentValue["FeedTest_Dec2"] = sResult.fVar65.ToString();
                CommonMethods.CurrentValue["FeedTest_Jerk2"] = sResult.fVar66.ToString();
                CommonMethods.CurrentValue["FeedTest_InhaleRivetTargetPos"] = sResult.fVar67.ToString();
                CommonMethods.CurrentValue["UPLimitPos"] = sResult.fVar68.ToString();
                CommonMethods.CurrentValue["StopTorque"] = sResult.fVar69.ToString(); 

            }
            catch (Exception)
            {
            }
        }
        #endregion

        #region 读结构体数组
        public static void ReadArray()
        {
            try
            {
                cache1 = (Cache1)tcAdsClient.ReadAny(iHandleArray, typeof(Cache1));

                X.Clear();
                X1.Clear();
                X2.Clear();
                Y1.Clear();
                Y2.Clear();
                Y3.Clear();
                Y4.Clear();
                XID.Clear();//2024
                BX.Clear();
                UpperError.Clear();
                LowerError.Clear();

                ProcessDataList.Clear();

                for (int i = 0; i <= Convert.ToInt32(CommonMethods.CurrentValue["Timer"]); i++)
                {
                    ProcessDataList.Add(new ProcessData()
                    {
                        DataPressure = cache1.Axis[i].ffvar1,
                        DataTorque = cache1.Axis[i].ffvar2,
                        ActVelo1 = cache1.Axis[i].ffvar3,
                        ActVelo2 = cache1.Axis[i].ffvar4,
                        ActPos1 = cache1.Axis[i].ffvar5 - cache1.Axis[0].ffvar5,
                        iCount = cache1.Axis[i].iCount //20240515
                    });
                    Y1.Add(cache1.Axis[i].ffvar1);
                    Y2.Add(cache1.Axis[i].ffvar2);
                    Y3.Add(cache1.Axis[i].ffvar3);
                    Y4.Add(cache1.Axis[i].ffvar4);
                    X.Add(cache1.Axis[i].ffvar5 - cache1.Axis[0].ffvar5);
                    X2.Add(cache1.Axis[i].ffvar5 - cache1.Axis[0].ffvar5);
                    XID.Add(cache1.Axis[i].iCount);
                    X1.Add(10 * i);
                    UpperError.Add(cache1.Axis[i].ffvar1 + 0.5f);
                    LowerError.Add(cache1.Axis[i].ffvar1 - 0.5f);
                }
                IsReadingArrOK = true;
            }
            catch (Exception)
            {
            }
        }
        #endregion

        #region 写入变量
        public static bool WriteVariable(string PlcVariableName, bool bResult)
        {
            try
            {
                int iHandleTemp = tcAdsClient.CreateVariableHandle(PlcVariableName);
                tcAdsClient.WriteAny(iHandleTemp, bResult);
                tcAdsClient.DeleteVariableHandle(iHandleTemp);
                return true;
            }
            catch { return false; }
        }

        public static bool WriteVariable(string PlcVariableName, ushort uResult)
        {
            try
            {
                int iHandleTemp = tcAdsClient.CreateVariableHandle(PlcVariableName);
                tcAdsClient.WriteAny(iHandleTemp, uResult);
                tcAdsClient.DeleteVariableHandle(iHandleTemp);
                return true;
            }
            catch { return false; }
        }



        public static bool WriteVariable(string PlcVariableName, Int16 uResult)
        {
            try
            {
                
                int iHandleTemp = tcAdsClient.CreateVariableHandle(PlcVariableName);
                tcAdsClient.WriteAny(iHandleTemp, uResult);
                tcAdsClient.DeleteVariableHandle(iHandleTemp);
                return true;
            }
            catch { return false; }
        }


        public static bool WriteVariable(string PlcVariableName, UInt32 uResult)
        {
            try
            {
                int iHandleTemp = tcAdsClient.CreateVariableHandle(PlcVariableName);
                tcAdsClient.WriteAny(iHandleTemp, uResult);
                tcAdsClient.DeleteVariableHandle(iHandleTemp);
                return true;
            }
            catch { return false; }
        }

        public static bool WriteVariable(string PlcVariableName, float fResult)
        {
            IsWriting = true;
            try
            {
                int iHandleTemp = tcAdsClient.CreateVariableHandle(PlcVariableName);
                tcAdsClient.WriteAny(iHandleTemp, fResult);
                tcAdsClient.DeleteVariableHandle(iHandleTemp);
                return true;
            }
            catch { return false; }
        }
        #endregion

        #region 断线重连
        public static void TcDispose()  //点击断开ads连接按钮触发
        {
            tcAdsClient.Dispose();
        }
        #endregion

    }
}